C头文件说明文库Word格式文档下载.docx
《C头文件说明文库Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《C头文件说明文库Word格式文档下载.docx(37页珍藏版)》请在冰豆网上搜索。
locale.h>
//定义本地化函数
math.h>
//定义数学函数
stdio.h>
//定义输入/输出函数
stdlib.h>
//定义杂项函数及内存分配函数
string.h>
//字符串处理
strstrea.h>
//基于数组的输入/输出
time.h>
//定义关于时间的函数
wchar.h>
//宽字符处理及输入/输出
wctype.h>
//宽字符分类
//////////////////////////////////////////////////////////////////////////
标准C++ (同上的不再注释)
algorithm>
//STL通用算法
bitset>
//STL位集容器
cctype>
cerrno>
clocale>
cmath>
complex>
//复数类
cstdio>
cstdlib>
cstring>
ctime>
deque>
//STL双端队列容器
exception>
//异常处理类
fstream>
functional>
//STL定义运算函数(代替运算符)
limits>
list>
//STL线性列表容器
map>
//STL映射容器
iomanip>
ios>
//基本输入/输出支持
iosfwd>
//输入/输出系统使用的前置声明
iostream>
istream>
//基本输入流
ostream>
//基本输出流
queue>
//STL队列容器
set>
//STL集合容器
sstream>
//基于字符串的流
stack>
//STL堆栈容器
stdexcept>
//标准异常类
streambuf>
//底层输入/输出支持
string>
//字符串类
utility>
//STL通用模板类
vector>
//STL动态数组容器
cwchar>
cwctype>
usingnamespacestd;
//#include<
等同于:
#include<
usingnamespacestd;
具体点:
std:
:
cout,std:
endl;
(在没有.h或者usingnamespacestd情况下)
cout,endl(在有.h或者usingnamespacestd)
C99增加
complex.h>
//复数处理
fenv.h>
//浮点环境
inttypes.h>
//整数格式转换
stdbool.h>
//布尔环境
stdint.h>
//整型环境
tgmath.h>
//通用类型数学宏
C头文件大全
分类函数,所在函数库为ctype.h
intisalpha(intch)若ch是字母('
'
A'
-'
Z'
'
a'
z'
)返回非0值,否则返回0
intisalnum(intch)若ch是字母('
)或数字('
0'
9'
)
返回非0值,否则返回0
intisascii(intch)若ch是字符(ASCII码中的0-127)返回非0值,否则返回0
intiscntrl(intch)若ch是作废字符(0x7F)或普通控制字符(0x00-0x1F)
intisdigit(intch)若ch是数字('
intisgraph(intch)若ch是可打印字符(不含空格)(0x21-0x7E)返回非0值,否则返回0
intislower(intch)若ch是小写字母('
intisprint(intch)若ch是可打印字符(含空格)(0x20-0x7E)返回非0值,否则返回0
intispunct(intch)若ch是标点字符(0x00-0x1F)返回非0值,否则返回0
intisspace(intch)若ch是空格('
'
),水平制表符('
\t'
),回车符('
\r'
),
走纸换行('
\f'
),垂直制表符('
\v'
),换行符('
\n'
intisupper(intch)若ch是大写字母('
intisxdigit(intch)若ch是16进制数('
F'
f'
)返回非0值,
否则返回0
inttolower(intch)若ch是大写字母('
)返回相应的小写字母('
inttoupper(intch)若ch是小写字母('
)返回相应的大写字母('
数学函数,所在函数库为math.h、stdlib.h、string.h、float.h
intabs(inti)返回整型参数i的绝对值
doublecabs(structcomplexznum)返回复数znum的绝对值
doublefabs(doublex)返回双精度参数x的绝对值
longlabs(longn)返回长整型参数n的绝对值
doubleexp(doublex)返回指数函数ex的值
doublefrexp(doublevalue,int*eptr)返回value=x*2n中x的值,n存贮在eptr中
doubleldexp(doublevalue,intexp);
返回value*2exp的值
doublelog(doublex)返回logex的值
doublelog10(doublex)返回log10x的值
doublepow(doublex,doubley)返回xy的值
doublepow10(intp)返回10p的值
doublesqrt(doublex)返回+√x的值
doubleacos(doublex)返回x的反余弦cos-1(x)值,x为弧度
doubleasin(doublex)返回x的反正弦sin-1(x)值,x为弧度
doubleatan(doublex)返回x的反正切tan-1(x)值,x为弧度
doubleatan2(doubley,doublex)返回y/x的反正切tan-1(x)值,y的x为弧度
doublecos(doublex)返回x的余弦cos(x)值,x为弧度
doublesin(doublex)返回x的正弦sin(x)值,x为弧度
doubletan(doublex)返回x的正切tan(x)值,x为弧度
doublecosh(doublex)返回x的双曲余弦cosh(x)值,x为弧度
doublesinh(doublex)返回x的双曲正弦sinh(x)值,x为弧度
doubletanh(doublex)返回x的双曲正切tanh(x)值,x为弧度
doublehypot(doublex,doubley)返回直角三角形斜边的长度(z),
x和y为直角边的长度,z2=x2+y2
doubleceil(doublex)返回不小于x的最小整数
doublefloor(doublex)返回不大于x的最大整数
voidsrand(unsignedseed)初始化随机数发生器
intrand()产生一个随机数并返回这个数
doublepoly(doublex,intn,doublec[])从参数产生一个多项式
doublemodf(doublevalue,double*iptr)将双精度数value分解成尾数和阶
doublefmod(doublex,doubley)返回x/y的余数
doublefrexp(doublevalue,int*eptr)将双精度数value分成尾数和阶
doubleatof(char*nptr)将字符串nptr转换成浮点数并返回这个浮点数
doubleatoi(char*nptr)将字符串nptr转换成整数并返回这个整数
doubleatol(char*nptr)将字符串nptr转换成长整数并返回这个整数
char*ecvt(doublevalue,intndigit,int*decpt,int*sign)
将浮点数value转换成字符串并返回该字符串
char*fcvt(doublevalue,intndigit,int*decpt,int*sign)
char*gcvt(doublevalue,intndigit,char*buf)
将数value转换成字符串并存于buf中,并返回buf的指针
char*ultoa(unsignedlongvalue,char*string,intradix)
将无符号整型数value转换成字符串并返回该