C/C++ 头文件 常用头文件功能查询表
#include <assert.h> //设定插入点
#include <ctype.h> //字符处理
#include <errno.h> //定义错误码
#include <float.h> //浮点数处理
#include <fstream.h> //文件输入/输出
#include <iomanip.h> //参数化输入/输出
#include <iostream.h> //数据流输入/输出
#include <limits.h> //定义各种数据类型最值常量
#include <locale.h> //定义本地化函数
#include <math.h> //定义数学函数
#include <stdio.h> //定义输入/输出函数
#include <stdlib.h> //定义杂项函数及内存分配函数
#include <string.h> //字符串处理
#include <strstrea.h> //基于数组的输入/输出
#include <time.h> //定义关于时间的函数
#include <wchar.h> //宽字符处理及输入/输出
#include <wctype.h> //宽字符分类
//////////////////////////////////////////////////////////////////////////
标准 C++ (同上的不再注释)
#include <algorithm> //STL 通用算法
#include <bitset> //STL 位集容器
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex> //复数类
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque> //STL 双端队列容器
#include <exception> //异常处理类
#include <fstream>
#include <functional> //STL 定义运算函数(代替运算符)
#include <limits>
#include <list> //STL 线性列表容器
#include <map> //STL 映射容器
#include <iomanip>
#inclu
相关文档:
qt默认的编程语言为C++语言。如果你用qt编译.c文件,会出现找不到C语言的默认头文件等错误(如:stdio.h等)。qt中不支持
extern "C"{}的这种写法,我前几天有一个C程序需要移植到Qt的工程中,本希望直接extern "C"就ok了,但发现qt4居然不支持这种写法。我的程序中用到了好几个linux系统头文件,是向串口发指令之类的程序 ......
最近对基础知识进行了学习,发现以前很多东西都没有搞清楚
1. 编译的问题,头文件主要是定义
//////// add.c
int add(int a, int b)
{
return a + b;
}
///////// main.c
#include <stdio.h>
int add(int a, int b);
int main ()
{
printf("%d" ......
这是C的原程序
#include <stdio.h>
#include <regex.h>
int main(int argc, char** argv)
{
regex_t reg;
regmatch_t pm[10];
char *pattern;
char buf[50];
const size_t nmatch = 10;
pattern = argv[1];
int result = regcomp(®, pattern, REG_EXTENDED);
while( fgets ......
C/C++
/*
* File: main.cpp
* Author: Vicky
*
* Created on 2010年4月29日, 上午9:46
*/
#include <iostream>
using namespace std;
int maximum(int[], int);
int main(int argc, char** argv) {
// int sg[3][4] = {
int sg[][4] = {
{68, 77, 73, 86},
{87, 96, 7 ......