C语言头文件大全(free)

合集下载

C语言头文件使用大全

C语言头文件使用大全
8
字符串转换 strxfrm 字符与字符串查找 字符查找 memchr 字符查找 strchr 在串中查找指定字符集的子集的第一次出现 strcspn 字符串查找 strpbrk 在串中查找指定字符集的子集的第一次出现 strspn 在串中查找指定字符串的第一次出现 strstr 字符串分解 strtok 杂类函数 字符串设置 memset 错误字符串映射 strerror 求字符串长度 strlen
头文件 math.h 函数列表 函数类别 函数用途 详细说明 错误条件处理 定义域错误(函数的输入参数值不在规定的范围内) 值域错误(函数的返回值不在规定的范围内) 三角函数 反余弦 acos 反正弦 asin 反正切 atan 反正切 2 atan2 余弦 cos 正弦 sin 正切 tan 双曲函数 双曲余弦 cosh 双曲正弦 sinh 双曲正切 tanh 指数和对数 指数函数 exp 指数分解函数 frexp 乘积指数函数 fdexp
7
多字节字符函数 得到多字节字符的字节数 mblen 得到多字节字符的字节数 mbtowc 多字节字符转换 wctomb 多字节字符的字符串操作 将多字节串转换为整数数组 mbstowcs 将多字节串转换为字符数组 mcstowbs
字符串处理 本分类的函数用于对字符串进行合并、比较等操作
头文件 string.h 函数列表 函数类别 函数用途 详细说明 字符串拷贝 块拷贝(目的和源存储区不可重叠) memcpy 块拷贝(目的和源存储区可重叠) memmove 串拷贝 strcpy 按长度的串拷贝 strncpy 将串拷贝到新建的位置处 strdup 字符串连接函数 串连接 strcat 按长度连接字符串 strncat 串比较函数 块比较 memcmp 字符串比较 strcmp 字符串比较(用于非英文字符) strcoll 按长度对字符串比较 strncmp

c语言头函数

c语言头函数

C语言中的头文件是包含在源代码文件中以便在编译时进行预处理的文件。

头文件通常包含函数、宏定义、结构体声明和其他重要的代码片段,以便在多个源文件中共享和重用。

一些常见的C语言头文件包括:
1. `<stdio.h>`:包含输入输出函数,如`printf` 和`scanf`。

2. `<stdlib.h>`:包含内存分配和释放函数,如`malloc` 和`free`,以及其他常用的函数。

3. `<string.h>`:包含字符串操作函数,如`strcpy`、`strlen` 和`strcmp`。

4. `<math.h>`:包含数学函数,如三角函数、指数函数等。

5. `<time.h>`:包含时间和日期相关的函数,如`time` 和`strftime`。

6. `<ctype.h>`:包含字符分类函数,如`isalpha` 和`isdigit`。

7. `<stdbool.h>`:定义了`bool` 类型和`true`、`false` 常量,用于布尔值。

8. `<stddef.h>`:定义了`NULL` 宏和一些与指针相关的类型。

这只是一小部分常用的C语言头文件,实际上还有很多其他头文件,每个头文件都提供了特定的功能。

通过包含适当的头文件,你可
以在C程序中使用相应的函数和定义。

单片机C语言常用头文件

单片机C语言常用头文件

函数原形的头文件读者可参考返回非整型值的函数assert.h - assert(), 声明宏ctype.h –字符类型函数float.h –浮点数原形limits.h –数据类型的大小和范围math.h –浮点运算函数stdarg.h –变量参数表.stddef.h –标准定义stdio.h –标准输入输出IO 函数stdlib.h –包含内存分配函数的标准库string.h –字符串处理函数3 字符类型库下列函数按照输入的ACS II 字符集字符分类使用这些函数之前应当用"#include <ctype.h>" 包含int isalnum(int c)如果c 是数字或字母返回非零数值否则返回零int isalpha(int c)如果c 是字母返回非零数值否则返回零int iscntrl(int c)如果c 是控制字符如FF, BELL, LF ..等返回非零数值否则返回零int isdigit(int c)如果c 是数字返回非零数值否则返回零int isgraph(int c)如果c 是一个可打印字符而非空格返回非零数值否则返回零int islower(int c)如果c 是小写字母返回非零数值否则返回零int isprint(int c)如果c 是一个可打印字符返回非零数值否则返回零int ispunct(int c)如果c 是一个可打印字符而不是空格数字或字母返回非零数值否则返回零int isspace(int c)如果c 是一个空格字符返回非零数值包括空格CR, FF, HT, NL, 和VT 否则返回零int isupper(int c)如果c 是大写字母返回非零数值否则返回零int isxdigit(int c)如果c 是十六进制数字返回非零数值否则返回零int tolower(int c)如果c 是大写字母则返回c 对应的小写字母其它类型仍然返回cint toupper(int c)如果c 是小写字母则返回c 对应的大写字母其它类型仍然返回c4 浮点运算库下列函数支持浮点数运算使用这些函数之前必须用#include <math.h> 包含float asin(float x)以弧度形式返回x 的反正弦值float acos(float x)以弧度形式返回x 的反余弦值float atan(float x)以弧度形式返回x 的反正切值float atan2(float x, float y)返回y/x 的反正切其范围在- ~+ 之间float ceil(float x)返回对应x 的一个整型数小数部分四舍五入float cos(float x)返回以弧度形式表示的x 的余弦值float cosh(float x)返回x 的双曲余弦函数值float exp(float x)返回以e 为底的x 的幂即e xfloat exp10(float x)返回以10 为底的幂即10xfloat fabs(float x)返回x 的绝对值float floor(float x)返回不大于x 的最大整数float fmod(float x, float y)返回x/y 的余数float frexp(float x, int *pexp)把浮点数x 分解成数字部分y 尾数和以2 为底的指数n 两个部分即x=y 2 n y 的范围为0.5 y 1 y 值被函数返回而n 值存放到pexp 指向的变量中float fround(float x)返回最接近x 的整型数float ldexp(float x, int exp)返回x 2 e x pfloat log(float x)返回x 的自然对数float log10(float x)返回以10 为底的x 的对数float modf(float x, float *pint)把浮点数分解成整数部分和小数部分整数部分存放到pint 指向的变量小数部分应当大于或等于0 而小于1 并且作为函数返回值返回float pow(float x, float y)返回x y 值float sqrt(float x)返回x 的平方根float sin(float x)返回以弧度形式表示的x 的正弦值float sinh(float x)返回x 的双曲正弦函数值float tan(float x)返回以弧度形式表示的x 的正切值float tanh(float x)返回x 的双曲正切函数值5 标准输入输出库标准的文件输入输出是不能真正植入微控制器MCU 的标准stdio.h 的许多内容不可以使用不过有一些IO 函数是被支持的同样使用之前应用"#include <stdio.h>"预处理并且需要初始化输出端口最低层的IO 程序是单字符的输入(getchar)和输出(putchar)程序如果你针对不同的装置使用高层的IO 函数例如用printf 输出LCD 你需要全部重新定义最底层的函数为在ATMEL 的AVR Studio 模拟器终端IO 窗口使用标准IO 函数应当在编译选项中选中相应的单选钮注意作为缺省单字符输出函数putchar 是输出到UART 装置没有修改无论如何为使输出能如期望的那样出现在程序终端窗口中'\n' 字符必须被映射为成对的回车和换行CR/LFint getchar()使用查寻方式从UART 返回一个字符int printf(char *fmt, ..)按照格式说明符输出格式化文本frm 字符串格式说明符是标准格式的一个子集%d--输出有符号十进制整数%o --输出无符号八进制整数%x - 输出无符号十六进制整数%X –除了大写字母使用'A'-'F'外同%x%u - 输出无符号十进制整数%s –输出一个以C 中空字符NULL 结束的字符串%c –以ASCII 字符形式输出只输出一个字符%f –以小数形式输出浮点数%S –输出在FLASH 存贮器中的字符串常量printf 支持三个版本取决于你的特别需要和代码的大小越高的要求代码越大基本形: 只有%c, %d, %x, %u, 和%s 格式说明符是承认的长整形: 针对长整形数的修改%ld, %lu, %lx 被支持, 以适用于精度要求较高的领域浮点形: 全部格式包括%f 被支持你使用编译选项对话框来选择版本代码大小的增加是值得关注的int putchar(int c)输出单个字符这个库程序使用了UART 以查寻方式输出单个字符注意输出’\n’字符至程序终端窗口int puts(char *s)输出以NL 结尾的字符串int sprintf(char *buf, char *fmt)按照格式说明符输出格式化文本frm 字符串到一个缓冲区格式说明符同printf( )"const char *" 支持功能cprintf 和csprintf 是将FLASH 中的格式字符串分别以prinf 和sprinf 形式输出6 标准库和内存分配函数标准库头文件<stdlib.h>定义了宏NULL 和RAND_MAX 和新定义的类型size_t 并且描述了下列函数注意在你调用任意内存分配程序比如.. calloc malloc 和realloc)之前必须调用_NewHeap 来初始化堆heapint abs(int i)返回i 的绝对值int atoi(char *s)转换字符串s 为整型数并返回它字符串s 起始必须是整型数形式字符否则返回0double atof(const char *s)转换转换字符串s 为双精度浮点数并返回它字符串s 起始必须是浮点数形式字符串long atol(char *s)转换字符串s 为长整型数并返回它字符串s 起始必须是长整型数形式字符否则返回0void *calloc(size_t nelem, size_t size)分配"nelem"个数据项的内存连续空间每个数据项的大小为size 字节并且初始化为0 如果分配成功返回分配内存单元的首地址否则返回0void exit(status)终止程序运行典型的是无限循环它是担任用户main 函数的返回点void free(void *ptr)释放ptr 所指向的内存区void *malloc(size_t size)分配size 字节的存贮区如果分配成功则返回内存区地址如内存不够分配则返回0void _NewHeap(void *start, void *end)初始化内存分配程序的堆一个典型的调用是将符号_bss_end+1 的地址用作"start"值符号_bss_end 定义为编译器用来存放全局变量和字符串的数据内存的结束加1 的目的是堆栈检查函数使用_bss_end 字节存贮为标志字节这个结束值不能被放入堆栈中extern char _bss_end;_NewHeap(&_bss_end+1, &_bss_end + 201); // 初始化200 字节大小的堆int rand(void)返回一个在0 和RAND_MAX 之间的随机数void *realloc(void *ptr, size_t size)重新分配ptr 所指向内存区的大小为size 字节size 可比原来大或小返回指向该内存区的地址指针void srand(unsigned seed)初始化随后调用的随机数发生器的种子数long strtol(char *s, char **endptr, int base)按照"base."的格式转换"s"中起始字符为长整型数如果"endptr"不为空* endptr 将设定"s"中转换结束的位置unsigned long strtoul(char *s, char **endptr, int base)除了返回类型为无符号长整型数外其余同"strtol"7 字符串函数用"#include <string.h>"预处理后编译器支持下列函数<string.h>定义了NULL 类型size_t和下列字符串及字符阵列函数void *memchr(void *s, int c, size_t n)在字符串s 中搜索n 个字节长度寻找与c 相同的字符如果成功返回匹配字符的地址指针否则返回NULLint memcmp(void *s1, void *s2, size_t n)对字符串s1 和s2 的前n 个字符进行比较如果相同则返回0 如果s1 中字符大于s2 中字符则返回1 如果s1 中字符小于s2 中字符则返回-1void *memcpy(void *s1, void *s2, size_t n)拷贝s2 中n 个字符至s1 但拷贝区不可以重迭void *memmove(void *s1, void *s2, size_t n)拷贝s2 中n 个字符至s1 返回s1 其与memcpy 基本相同但拷贝区可以重迭void *memset(void *s, int c, size_t n)在s 中填充n 个字节的c 它返回schar *strcat(char *s1, char *s2)拷贝s2 到s1 的结尾返回s1char *strchr(char *s, int c)在s1 中搜索第一个出现的c 包括结束NULL 字符如果成功返回指向匹配字符的指针如果没有匹配字符找到返回空指针int strcmp(char *s1, char *s2)比较两个字符串如果相同返回0 如果s1>s2 则返回1 如果s1<s2 则返回-1char *strcpy(char *s1, char *s2)拷贝字符串s2 至字符串s1 返回s1size_t strcspn(char *s1, char *s2)在字符串s1 搜索与字符串s2 匹配的第一个字符包括结束NULL 字符其返回s1 中找到的匹配字符的索引size_t strlen(char *s)返回字符串s 的长度不包括结束NULL 字符char *strncat(char *s1, char *s2, size_t n)拷贝字符串s2 不含结束NULL 字符中n 个字符到s1 如果s2 长度比n 小则只拷贝s2返回s1int strncmp(char *s1, char *s2, size_t n)基本和strcmp 函数相同但其只比较前n 个字符char *strncpy(char *s1, char *s2, size_t n)基本和strcpy 函数相同但其只拷贝前n 个字符char *strpbrk(char *s1, char *s2)基本和strcspn 函数相同但它返回的是在s1 匹配字符的地址指针否则返回NULL 指针char *strrchr(char *s, int c)在字符串s 中搜索最后出现的c 并返回它的指针否则返回NULL .size_t strspn(char *s1, char *s2)在字符串s1 搜索与字符串s2 不匹配的第一个字符包括结束NULL 字符其返回s1 中找到的第一个不匹配字符的索引char *strstr(char *s1, char *s2)在字符串s1 中找到与s2 匹配的子字符串如果成功它返回s1 中匹配子字符串的地址指针否则返回NULL"const char *" 支持函数这些函数除了它的操作对象是在FLASH 中常数字符串外其余同c 中的函数size_t cstrlen(const char *s)char *cstrcpy(char *dst, const char *src);int cstrcmp(const char *s1, char *s2);8 变量参数函数<stdarg.h>提供再入式函数的变量参数处理它定义了不确定的类型va_list 和三个宏va_start(va_list foo, <last-arg>)初始化变量foova_arg(va_list foo, <promoted type>)访问下一个参数分派指定的类型注意那个类型必须是高级类型如int long 或double小的整型类型如"char"不能被支持va_end(va_list foo)结束变量参数处理例如printf()可以使用vfprintf()来实现#include <stdarg.h>int printf(char *fmt, ...){va_list ap;va_start(ap, fmt);vfprintf(fmt, ap);va_end(ap);}9 堆栈检查函数有几个库函数是用于检查堆栈是否溢出内存图如下如果硬件堆栈增长到软件堆栈中那么软件堆栈的内容将会被改变也就是说局部变量和别的堆栈项目被改变硬件堆栈是用作函数的返回地址如果你的函数调用层次太深偶然会发生这种情况同样地软件堆栈溢出进数据区域将会改变全局变量或其它静态分配的项目如果你使用动态分配内存还会改变堆项目这种情况在你定义了太多的局部变量或一个局部集合变量太大也会偶然发生高端地址硬件堆栈区警戒线软件堆栈区警戒线数据区低端地址警戒线启动代码写了一个正确的关于数据区的地址字节和一个类似的正确的关于软件堆栈的地址字节作为警戒线[注意如果你使用了你自己的启动文件而其又是以6.20 版本之前的启动文件为基础的你将需要额外改造为新的启动文件]注意如果你使用动态分配内存你必须跳过警戒线字节_bss_end 来分配你的堆参考内存分配函数堆栈检查你调用_StackCheck(void)函数来检查堆栈溢出如果警戒线字节仍然保持正确的值那么函数检查通过如果堆栈溢出那么警戒线字节将可能被破坏注意当你的程序堆栈溢出的时候你的程序将可能运行不正常或偶然崩溃当_StackCheck 检查错误条件时它调用了带一个参数的函数_StackOverflowed(char c) 如果参数是1 那么硬件堆栈有过溢出如果参数是0 那么软件堆栈曾经溢出在那个例子中制造了两个功能调用它是两个堆栈都可能溢出的无论如何在_StackOverflowed 执行起作用时第二个调用不可以出现作为例子如果函数复位了CPU 那么将不能返回_StackCheck 函数缺省的_StackOverflowed 函数当它被调用时库会用一个缺省的_StackOverflowed 函数来跳转到0 的位置因此复位CPU 和程序你可能希望用一个函数来代替它以指示更多的错__。

c语言的头文件大全

c语言的头文件大全
fclose stdio. h
feof stdio.h
ferror stdio.h
fflush stdio. h
fgetc stdio.h
C标准库中所缺的函数可以从其它途径获得,例如编译程序开发商和第三方的函数库都会提供一些函数,这些函数都是事实上的标准函数。然而,标准库中的函数已经为程序设计提供了一个非常坚实的基础
12.1. 为什么应该使用标准库函数而不要自己编写函数?
标准库函数有三点好处:准确性、高效性和可移植性。
fwrite stdio. h
getc stdio.h
getchar stdio. h
getenv stdlib. h
gets stdio.h
abort stdlib. h
abs stdlib. h
acos math. h
asctime time. h
asin math. h
islower ctype. h
isprint ctype. h
ispunct ctype. h
isspace ctype. h
isupper ctype. h
fmod math. h
fopen stdio. h
FOPEN_MAX stdio. h
fpos_t stdio. h
fpnntf stdio. h
因此,你不用去寻找真正定义一个函数的头文件并使用这个文件,而应该使用那个被假定为定义了该函数的头文件,这样做是肯定可行的。
有几个名字在多个头文件中被定义:NULL,size_t和wchar_t。如果你需要其中一个名字的定义,可以使用任意一个定义了该名字的头文件((stddef.h>是一个较好的选择,它不仅小,而且包含了常用的宏定义和类型定义)。

C语言头文件大全(free)

C语言头文件大全(free)

<bitset> -- for defining a template class that administers sets of bits
<complex> -- for defining a template class that supports complex arithmetic
<deque>
-- (STL) for defining a template class that implements a deque container
<exception> -- for defining several functions that control exception handling
<fstream> -- for defining several iostreams template classes that manipulate exteral files
defined
<iostream> -- for declaring the iostreams objects that manipulate the standard streams
<istream> -- for defining the template class that performs extractions
<slist>
The Standard C++ library consists of 51 required headers.This implementation also includes
three additional headers,<hash_map>,<hash_set>,and <slist>,not required by the C++ Standard,

C语言头文件使用大全

C语言头文件使用大全

头文件ctype.h函数列表<>函数类别函数用途详细说明字符测试是否字母和数字isalnum 是否字母isalpha 是否控制字符iscntrl 是否数字isdigit 是否可显示字符(除空格外)isgraph 是否可显示字符(包括空格)isprint 是否既不是空格,又不是字母和数字的可显示字符是否空格isspace 是否大写字母isupper 是否16 进制数字(0-9,A-F )字符isxdigit 字符大小写转换函数转换为大写字母toupper 转换为小写字母tolowerispunct 地区化本类别的函数用于处理不同国家的语言差异头文件local.h 函数列表函数类别函数用途详细说明地区控制地区设置setlocale数字格式约定查询国家的货币、日期、时间等的格式转换localeconv数学函数本分类给出了各种数学计算函数,必须提醒的是ANSI C 标准中的数据格式并不符合IEEE754 标准,一些C 语言编译器却遵循IEEE754(例如frinklin C51)头文件math.h函数列表函数类别函数用途详细说明错误条件处理定义域错误(函数的输入参数值不在规定的范围内)值域错误(函数的返回值不在规定的范围内)三角函数反余弦acos反正弦asin 反正切atan反正切2 atan2余弦cos 正弦sin 正切tan 双曲函数双曲余弦cosh 双曲正弦sinh 双曲正切tanh 指数和对数指数函数exp 指数分解函数frexp 乘积指数函数fdexp 自然对数log 以10 为底的对数log10 浮点数分解函数modf 幂函数幂函数pow 平方根函数sqrt 整数截断,绝对值和求余数函数求下限接近整数绝对值fabs 求上限接近整数floor 求余数fmod本分类函数用于实现在不同底函数之间直接跳转代码文件setjmp.h io.h函数列表函数类别函数用途详细说明保存调用环境setjmpceil恢复调用环境longjmp信号处理该分类函数用于处理那些在程序执行过程中发生例外的情况。

C标准库函数的头文件

C标准库函数的头文件

标准库函数地头文件---------------------------------------------------------------------- 函数头文件----------------------------------------------------------------------abort stdlib.habs stdlib.h acos math.h asctime time.hasin math.h assert assert.hatan math.h atan2 math.h atexit stdlib.hatof stdlib.hatoi stdlib.hatol stdlib.h bsearch stdlib.h BUFSIZ stdio.h calloc stdlib.hceil math.h clearerr stdio.hclock time.h CLOCKS-PER-SEC time.hclock_t time.hcos math.h cosh math.h ctime time.h difftime time.hdiv stdlib.hdiv_t stdlib.h EDOM errno.h EOF stdio.h ERANGE errno.h errno errno.hexit stdlib.h EXIT_FAILURE stdlib.h EXIT_SUCCESS stdlib.hexp math.h fabs math.h fclose stdio.hfeof stdio.h ferror stdio.hfgetc stdio.h fgetpos stdio.h fgets stdio.h FILE stdio.h FILENAME-MAX stdio.h floor math.h fmod math.h fopen stdio.h FOPEN_MAX stdio.h fpos_t stdio.h fpnntf stdio.h fputc stdio.h fputs stdio.h head stdio.h free stdlib.h freopen stdio.h frexp math.h fscanf stdio.h fseek stdio.h fsetpos stdio.h ftell stdio.h fwrite stdio.h getc stdio.h getchar stdio.h getenv stdlib.h gets stdio.h gmtime time.h HUGE-V AL math.h _IOFBF stdio.h _IOLBF stdio.h _IONBF stdio.h isalnum ctype.h isalpha ctype.h iscntrl ctype.h isdigit ctype.h isgraph ctype.h islower ctype.h isprint ctype.h ispunct ctype.h isspace ctype.h isupper ctype.h isxdigit ctype.h jmp_buf setjmp.hLC_ALL locale.hLC_COLLATE locale.hLC_CTYPE locale.hLC_MONETARY locale.hLC_NUMERIC locale.hLC_TIME locale.hstruct lconv locale.hldexp math.hldiv stdlib.hldiv_t stdlib.hlocaleconv locale.hlocaltime timehlog math.hlog10 math.hlongjmp setjmp.hL_tmpnam stdio.hmalloc stdlib.hmblen stdlib.hmbstowcs stdlib.hmbtowc stdlib.hMB_CUR_MAX stdlib.hmemchr string.hmemcmp string.hmemcpy string.hmemmove string.hmemset string.hmktime time.hmodf math.hNDEBUG assert.hNULL locale.h stddef.h stdio.h stdlib.h string.h time.hoffsetof stddef.hperror stdio.hpow math.hprintf stdio.hptrdiff_t stddef.hputc stdio.hputchar stdio.hputs stdio.hqsort stdlib.hraise signal.hrand stdlib.hRAND_MAX stdlib.hremove stdio.hrename stdio.hrewind stdio.hscanf stdio.hSEEK_CUR stdio.hSEEK_END stdio.hSEEK_SET stdio.hsetbuf stdio.hsetjmp setjmp. hsetlocale locale.hsetvbuf stdio.hSIGABRT signal.hSIGFPE signal.hSIGILL signal.hSIGINT signal.hsignal signal.hSIGSEGV signal.hSIGTERM signal.hsig_atomic_t signal.hSIG_DFL signal.hSIG_ERR signal.hSIG_IGN signal.hsin math.hsinh math.hsize_t stddef.h stdlib.h string.hsprintf stdio.hsqrt math.hsrand stdlib.hsscanf stdio.hstderr stdio.hstdin stdio.hstdout stdio.hstrcat string.hstrchr string.hstrcmp string.hstrcoll string.hstrcpy string.hstrcspn string.hstrerror string.hstrftime time.hstrlen string.hstrncat string.hstrncpy string.h strpbrk string.h strrchr string.h strspn string.h strstr string.h strtod stdlib.h strtok string.h strtol stdlib.h strtoul stdlib.h strxfrm string.h system stblib.h tan math.h tanh math.h time time.h time_t time.h struct tm time.h tmpfile stdio.h tmpnam stdio.h TMP_MAX stdio.h tolower ctype.h toupper ctype.h ungetc stdio.h va_arg stdarg.h va_end stdarg.h valist stdarg.h va_ start stdarg.h vfprintf stdio.h vprintf stdio.h vsprintf stdio.h wchar_t stddef.h. wcstombs stdlib.h wctomb stdlib.h----------------------------------------------------版权申明本文部分内容,包括文字、图片、以及设计等在网上搜集整理.版权为个人所有This article includes some parts, including text, pictures, and design. Copyright is personal ownership.用户可将本文地内容或服务用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律地规定,不得侵犯本网站及相关权利人地合法权利.除此以外,将本文任何内容或服务用于其他用途时,须征得本人及相关权利人地书面许可,并支付报酬.Users may use the contents or services of this article for personal study, research or appreciation, and othernon-commercial or non-profit purposes, but at the same time, they shall abide by the provisions of copyright law and other relevant laws, and shall not infringe upon the legitimate rights of this website and its relevant obligees. In addition, when any content or service of this article is used for other purposes, written permission and remuneration shall be obtained from the person concerned and the relevant obligee.转载或引用本文内容必须是以新闻性或资料性公共免费信息为使用目地地合理、善意引用,不得对本文内容原意进行曲解、修改,并自负版权等法律责任.Reproduction or quotation of the content of this article must be reasonable and good-faith citation for the use of news or informative public free information. It shall not misinterpret or modify the original intention of the content of this article, and shall bear legal liability such as copyright.。

c语言头文件大全

c语言头文件大全

c语言头文件大全ctype.h字符处理函数: 本类别函数用于对单个字符进行处理,包括字符的类别测试和字符的大小写转换----------------------------------------字符测试是否字母和数字isalnum是否字母isalpha是否控制字符iscntrl是否数字isdigit是否可显示字符(除空格外) isgraph是否可显示字符(包括空格) isprint是否既不是空格,又不是字母和数字的可显示字符ispunct是否空格isspace是否大写字母isupper是否16进制数字(0-9,A-F)字符isxdigit字符大小写转换函数转换为大写字母toupper转换为小写字母tolower头文件local.h地区化: 本类别的函数用于处理不同国家的语言差异。

----------------------------------------地区控制地区设置setlocale数字格式约定查询国家的货币、日期、时间等的格式转换localeconv头文件math.h数学函数: 本分类给出了各种数学计算函数,必须提醒的是ANSIC标准中的数据格式并不符合IEEE754标准,一些C语言编译器却遵循IEEE754(例如frinklin C51)----------------------------------------反余弦acos反正弦asin反正切atan反正切2 atan2余弦cos正弦sin正切tan双曲余弦cosh双曲正弦sinh双曲正切tanh指数函数exp指数分解函数frexp乘积指数函数fdexp自然对数log以10为底的对数log10浮点数分解函数modf幂函数pow平方根函数sqrt求下限接近整数ceil绝对值fabs求上限接近整数floor求余数fmod头文件setjmp.h io.h本分类函数用于实现在不同底函数之间直接跳转代码。

----------------------------------------保存调用环境setjmp恢复调用环境longjmp头文件signal.h信号处理: 该分类函数用于处理那些在程序执行过程中发生例外的情况。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

<fcntl.h> 文件控制
<glob.h> 路径名模式匹配类型 <grp.h> 组文件
<pwd.h> 口令文件
<regex.h> 正则表达式
<termios.h> 终端 I/O
<unistd.h> 符号常量
<wordexp.h> 字扩展类型
<arpa/inet.h> Internet 定义
<netinet/in.h> Internet 地址族 <netinet/tcp.h> 传输控制协议
<locale> -- for defining several classes and templates that control
locale-specific behavior, as in the iostreams classes
<map>
-- (STL) for defining template classes that implement associative containers that
<pthread.h> 线程 <spawn.h> 实时 spawn 接口
标准 C++ 语言头文件(54 个其中 16 个用于构建 STL,3 个为附加非必须)
<algorithm> STL 通用算法
<bitset> STL 位集容器
<cassert> 用于在程序运行时执行断言
<cctype> 字符处理
defined
<iostream> -- for declaring the iostreams objects that manipulate the standard streams
<istream> -- for defining the template class that performs extractions
map keys to values
<memory> -- (STL) for defining several templates that allocate and free storage for various
container classes
<new>
-- for declaring several functions that allocate and free storage
<signal.h> 信号
<stdarg.h> 可变参数表
<stddef.h> 标准定义
<stdint.h> 整型
<stdlib.h> 实用程序库函数
<string.h> 字符串操作
<time.h> 时间和日期
<wchar.h> 宽字符支持
POSIX 标准定义的必须的头文件(26 项)
<dirent.h> 目录项
<cstdio> 输入/输出
<cstdlib> 杂项函数及内存分配
<cstring> 字符串
<ctime> 时间
<cwchar> 宽字符处理及输入/输出
<cwctype> 宽字符分类
<deque> STL 双端队列容器
<exception> 异常处理类
<fstream> 文件流
<functional> STL 函数对象 <iomanip> 参数化输入/输出
for a total of 54 headers.Of these 54 headers,16 constitute the Standard Template Library,
or STL.These are indicated below with the notation
<algorithm> -- (STL) for defining numerous templates that implement useful algorithms
<ios>
-- for defining the template class that serves as the base for many iostreams classes
<iosfwd> -- for declaring several iostreams template classes before they are necessarily
<slist>
The Standard C++ library consists of 51 required headers.This implementation also includes
three additional headers,<hash_map>,<hash_set>,and <slist>,not required by the C++ Standard,
<ios> 基本输入/输出支持
<iosfwd> 输入/输出前置声明 <iostream> 数据流输入/输出
<istream> 基本输入流
<iterator> 遍历序列的类
<limits> 各种数据类型最值常量
<list> STL 线性列表容器
<locale> 国际化支持
<map> STL 映射容器
<memory> 专用内存分配器
<utmpx.h> 用户帐户数据库
<sys/msg.h> 消息队列
<sys/resource.h> 资源操作
<sys/shm.h> 共享存储
<sys/statvfs.h> 文件系统信息
<sys/timeb.h> 附加的时间
<sys/uio.h> 矢量 I/O 操作
POSIX 标准定义的可选头文件(8 项)
<new> 基本内存分配和释放
<numeric> 通用的数字操作
<ostream> 基本输出流
<queue> STL 队列容器
<set> STL 集合容器
<sstream> 基于字符串的流
<stack> STL 堆栈容器
<stdexcept> 标准异常类
<streambuf> iostream 的缓冲区类
<functional> -- (STL) for defining several templates that help construct predicates for
the templates defined in <algorithm> and <numeric>
<hash_map> -- (STL) for defining template classes that implement hashed associative containers
<fnmatch.h> 文件名匹配类型 <netdb.h> 网络数据库操作 <tar.h> tar 归档值 <utime.h> 文件时间 <net/if.h> 套接字本地接口 <sys/mman.h> 内存管理声明 <sys/stat.h> 文件状态 <sys/un.h> UNIX 域套接字定义
<fmtmsg.h> 消息显示结构 <langinfo.h> 语言信息常量 <ndbm.h> 数据库操作 <search.h> 搜索表 <ucontext.h> 用户上下文 <sys/ipc.h> IPC <sys/sem.h> 信号量 <sys/time.h> 时间类型
<sys/select.h> select 函数 <sys/socket.h> 套接字接口
<sys/times.h> 进程时间
<sys/types.h> 基本系统数据类型
<sys/utsname.h>系统名
<sys/wait.h> 进程控制
POSIX 标准定义的 XSI 扩展头文件(26 项)
<cpio.h> cpio 归档值
<bitset> -- for defining a template class that administers sets of bits
<complex> -- for defining a template class that supports complex arithmetic
<deque>
<queue>
-- (STL) for defining a template class that implements a queue container
<set>
-- (STL) for defining template classes that implement associative containers
相关文档
最新文档