C语言头文件使用大全
C语言常见头文件 计算机二级必备

#include <list> //STL 线性列表容器
#include <map> //STL 映射容器
#include <iomanip>
#include <ios> //基本输入/输出支持
#include <iosfwd> //输入/输出系统使用的前置声明
#include <vector> //STL 动态数组容器
#include <cwchar>
#include <cwctype>
using namespace std;
//////////////////////////////////////////////////////////////////////////
你就可以自定义一个头文件,然后把这些头文件放到自定义的头文件中,然后在那个类开头包含自定义的头文件就行了,不需要再写以上头文件,这样就使代码显得简练易懂.
c++里面的类,函数,变量都有声明和定义的区别
在用到一个类或函数或变量之前,必须进行声明,但可以在之后定义。
比如
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque> //STL 双端队列容器
#include <exception> //异常处理类
#include <fstream>
#include <functional> //STL 定义运算函数(代替运算符)
c语言的头文件大全

有趣的是,你很难找到一项关于标准库函数的最标准的信息。对于每一个函数,都需要有一个(在极少数情况下需要两个)保证能将该函数的原型提供给你的头文件(在调用任何一个函数时,都应该包含其原型,见8.2)。有趣的是什么呢?这个头文件可能并不是真正包含该函数原型的文件,在有些(非常糟糕!)情况下,甚至由编译程序手册推荐的头文件都不一定正确。对于宏定义,typedef和全局变量,同样会发生这种情况。
fclose stdio. h
feof stdio.h
ferror stdio.h
fflush stdio. h
fgetc stdio.h
c标准库中还缺少很多函数,例如投有图形函数,甚至没有全屏幕文本操作函数,signal机制也相当弱(见12.10),并且根本没有对多任务或使用常规内存以外的内存提供支持。尽管C标准库存在上述缺陷,但它毕竟为所有的程序都提供了一套基本功能,不管这些程序是运行在多任务、多窗口的环境下,还是运行在简单的终端上,或者是运行在一台昂贵的烤面包机上。
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
cos math. h
cosh math. h
ctime time. h
c语言include用法及搭配

c语言include用法及搭配一、概述在C语言中,include是一个非常重要的关键字。
它可以将一个文件中的内容包含到另一个文件中。
通过使用include,我们可以在程序中使用其他文件中定义的函数、变量和结构体等。
二、基本用法C语言中,使用include关键字需要在其后加上要包含的文件名。
例如:#include "stdio.h"这条语句就是将stdio.h这个头文件包含到当前文件中。
需要注意的是,在引用头文件时,需要使用双引号或尖括号来指定路径。
如果要引用自己编写的头文件,则需要将该头文件放置在与当前源代码相同的目录下,并使用双引号来指定路径。
#include "myheader.h"三、搭配其他关键字1. #ifndef和#define为了避免重复引用同一个头文件,我们通常会在头文件中加入以下代码:#ifndef MYHEADER_H#define MYHEADER_H// 头文件内容#endif这里的MYHEADER_H可以替换成任何你想要的标识符。
当第一次引用该头文件时,MYHEADER_H还没有被定义,因此#ifndef后面的代码会被执行;当第二次及以后再次引用该头文件时,因为MYHEADER_H已经被定义过了,所以#ifndef后面的代码不会被执行。
2. #pragma once除了使用#ifndef和#define之外,还可以使用#pragma once来避免重复引用。
该关键字可以在头文件中的最开始处使用,例如:#pragma once// 头文件内容与#ifndef和#define的作用相同,都是避免同一个头文件被重复引用。
3. #ifdef和#endif在程序中,我们可能会根据不同的条件来选择性地包含某些头文件。
这时可以使用#ifdef和#endif来实现。
例如,下面的代码表示如果宏定义DEBUG被定义了,则包含debug.h头文件:#ifdef DEBUG#include "debug.h"#endif四、常见头文件C语言中有很多常见的头文件,下面列举几个常用的:1. stdio.h:标准输入输出库,包含了很多输入输出函数。
c语言的头文件大全

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语言头文件使用大全

头文件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语言头文件大全.doc-吕滔博客

标准C语言头文件ISO C标准定义的头文件(24项)<assert.h> 验证程序断言<complex.h> 支持复数算术运算<ctype.h> 字符类型<errno.h> 出错码<fenv.h> 浮点环境<float.h> 浮点常量<inttypes.h> 整型格式转换<iso646.h> 替代关系操作符宏<limits.h> 实现常量<locale.h> 局部类别<math.h> 数学常量<setjmp.h> 非局部goto<signal.h> 信号<stdarg.h> 可变参数表<stdbool.h> 布尔类型和值<stddef.h> 标准定义<stdint.h> 整型<stdio.h> 标准I/O库<stdlib.h> 实用程序库函数<string.h> 字符串操作<tgmath.h> 通用类型数学宏<time.h> 时间和日期<wchar.h> 宽字符支持<wctype.h> 宽字符分类和映射支持POSIX标准定义的必须的头文件(26项)<dirent.h> 目录项<fcntl.h> 文件控制<fnmatch.h> 文件名匹配类型<glob.h> 路径名模式匹配类型<grp.h> 组文件<netdb.h> 网络数据库操作<pwd.h> 口令文件<regex.h> 正则表达式<tar.h> tar归档值<termios.h> 终端I/O <unistd.h> 符号常量<utime.h> 文件时间<wordexp.h> 字扩展类型<arpa/inet.h> Internet定义<net/if.h> 套接字本地接口<netinet/in.h> Internet地址族 <netinet/tcp.h> 传输控制协议<sys/mman.h> 内存管理声明<sys/select.h> select函数<sys/socket.h> 套接字接口<sys/stat.h> 文件状态<sys/times.h> 进程时间<sys/types.h> 基本系统数据类型<sys/un.h> UNIX域套接字定义<sys/utsname.h>系统名<sys/wait.h> 进程控制POSIX标准定义的XSI扩展头文件(26项)<cpio.h> cpio归档值<dlfcn.h> 动态链接<fmtmsg.h> 消息显示结构<ftw.h> 文件树漫游<iconv.h> 代码集转换实用程序<langinfo.h> 语言信息常量<libgen.h> 模式匹配函数定义<monetary.h> 货币类型<ndbm.h> 数据库操作<nl_types.h> 消息类别<poll.h> 轮询函数<search.h> 搜索表<strings.h> 字符串操作<syslog.h> 系统出错日志记录<ucontext.h> 用户上下文<ulimit.h> 用户限制<utmpx.h> 用户帐户数据库<sys/ipc.h> IPC<sys/msg.h> 消息队列<sys/resource.h> 资源操作<sys/sem.h> 信号量<sys/shm.h> 共享存储<sys/statvfs.h> 文件系统信息<sys/time.h> 时间类型<sys/timeb.h> 附加的时间<sys/uio.h> 矢量I/O操作POSIX标准定义的可选头文件(8项)<aio.h> 异步I/O <mqueue.h> 消息队列<pthread.h> 线程<sched.h> 执行调度<semaphore.h> 信号量<spawn.h> 实时spawn接口<stropts.h> XSI STREAMS接口<trace.h> 时间跟踪标准 C++ 语言头文件(54个其中16个用于构建STL,3个为附加非必须)<algorithm>STL通用算法<bitset> STL位集容器<cassert> 用于在程序运行时执行断言<cctype> 字符处理<cerrno> 错误码<cfloat> 用于测试浮点类型属性<ciso646> ISO646变体字符集<climits> 测试整数类型属性<clocale> 本地化函数<cmath> 数学函数<complex>复数类<csetjmp> 执行非内部的goto语句<csignal> 信号<cstdarg> 访问参数数量变化的函数<cstddef> 用于定义实用的类型和宏<cstdio> 输入/输出<cstdlib> 杂项函数及内存分配<cstring> 字符串<ctime> 时间<cwchar> 宽字符处理及输入/输出<cwctype> 宽字符分类<deque> STL双端队列容器<exception> 异常处理类<fstream> 文件流<functional> STL函数对象<iomanip> 参数化输入/输出<ios>基本输入/输出支持<iosfwd> 输入/输出前置声明<iostream> 数据流输入/输出<istream> 基本输入流<iterator> 遍历序列的类<limits> 各种数据类型最值常量<list>STL线性列表容器<locale> 国际化支持<map> STL映射容器<memory> 专用内存分配器<new> 基本内存分配和释放<numeric> 通用的数字操作<ostream> 基本输出流<queue> STL 队列容器<set> STL 集合容器<sstream> 基于字符串的流<stack> STL 堆栈容器<stdexcept> 标准异常类<streambuf> iostream 的缓冲区类<string> 字符串类<strstream> 非内存字符序列的流类<typeinfo> 运行时类型标识<utility> STL 通用模板类<valarray> 支持值数组的类和模版类<vector> STL 动态数组容器标准C++附加的头文件(3个)非必须<hash_map> <hash_set> <slist>The Standard C++ library consists of 51 required headers.This implementation also includesthree additional headers,<hash_map>,<hash_set>,and <slist>,not required by the C++ Standard,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<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<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 containersthat map keys to values<hash_set> -- (STL) for defining template classes that implement hashed associative containers<iomanip> -- for declaring several iostreams manipulators that take an argument<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 necessarilydefined<iostream> -- for declaring the iostreams objects that manipulate the standard streams<istream> -- for defining the template class that performs extractions<iterator> -- (STL) for defining several templates that help define and manipulate iterators<limits> -- for testing numeric type properties<list>-- (STL) for defining a template class that implements a doubly linked list container<locale> -- for defining several classes and templates that controllocale-specific behavior, as in the iostreams classes<map>-- (STL) for defining template classes that implement associative containers thatmap keys to values<memory>-- (STL) for defining several templates that allocate and free storage for variouscontainer classes<new> -- for declaring several functions that allocate and free storage<numeric>-- (STL) for defining several templates that implement useful numeric functions<ostream> -- for defining the template class that performs insertions<queue> -- (STL) for defining a template class that implements a queue container<set>-- (STL) for defining template classes that implement associative containers<slist>-- (STL) for defining a template class that implements a singly linked list container<sstream> -- for defining several iostreams template classes that manipulate string containers<stack> -- (STL) for defining a template class that implements a stack container<stdexcept> -- for defining several classes useful for reporting exceptions<streambuf> -- for defining template classes that buffer iostreams operations<string> -- for defining a template class that implements a string container<strstream> -- for defining several iostreams classes that manipulate in-memory character sequences<typeinfo> -- for defining class type_info, the result of the typeid operator<utility>-- (STL) for defining several templates of general utility<vector>-- (STL) for defining a template class that implements a vector container新的C标准库<cassert> -- for enforcing assertions when functions execute<cctype> -- for classifying characters<cerrno> -- for testing error codes reported by library functions<cfloat> -- for testing floating-point type properties<ciso646> -- for programming in ISO 646 variant character sets<climits> -- for testing integer type properties<clocale> -- for adapting to different cultural conventions<cmath> -- for computing common mathematical functions<csetjmp> -- for executing nonlocal goto statements<csignal> -- for controlling various exceptional conditions<cstdarg> -- for accessing a varying number of arguments<cstddef> -- for defining several useful types and macros<cstdio> -- for performing input and output<cstdlib> -- for performing a variety of operations<cstring> -- for manipulating several kinds of strings<ctime> -- for converting between various time and date formats<cwchar> -- for manipulating wide streams and several kinds of strings<cwctype> -- for classifying wide characters旧的C标准库<assert.h> -- for enforcing assertions when functions execute<ctype.h> -- for classifying characters<errno.h> -- for testing error codes reported by library functions<float.h> -- for testing floating-point type properties<iso646.h> -- for programming in ISO 646 variant character sets<limits.h> -- for testing integer type properties<locale.h> -- for adapting to different cultural conventions<math.h> -- for computing common mathematical functions<setjmp.h> -- for executing nonlocal goto statements<signal.h> -- for controlling various exceptional conditions<stdarg.h> -- for accessing a varying number of arguments<stddef.h> -- for defining several useful types and macros<stdio.h> -- for performing input and output<stdlib.h> -- for performing a variety of operations<string.h> -- for manipulating several kinds of strings<time.h> -- for converting between various time and date formats<wchar.h> -- for manipulating wide streams and several kinds of strings<wctype.h> -- for classifying wide charactersFinally, in this implementation, the Standard C++ library also includes several headers for compatibility with traditional C++ libraries:<fstream.h> -- for defining several iostreams template classes that manipulate exteral files <iomanip.h> -- for declaring several iostreams manipulators that take an argument<iostream.h> -- for declaring the iostreams objects that manipulate the standard streams <new.h> -- for declaring several functions that allocate and free storage财务部工作总结、分析及计划报告范文[财务部工作总结、分析及计划报告范文]务部工作总结、分析及计划报告范文2009-12-10 10:25读者上传【大中小】【打印】【我要纠错】在上级财务部门的业务指导下,以年初支公司提出的工作思路为指导,以提高企业效益为核心,以增强企业综合竞争力为目标,以成本治理和资金治理为重点,全面落实预算治理,强基础,抓规范,实现了全年业务制度规范化,经营治理科学化,企业效益最大化,有力地推动了支公司财务治理水平的进一步提高,充分发挥了财务治理在企业治理中的核心作用,财务部工作总结、分析及计划报告范文。
C 头文件大全

if(isblank('\t')) // Tab printf("It's True"); // 显示 It's True
if(isblank('\n')) // 换行 printf("It's True"); // 显示 ''
if(isspace('\n')) // 换行 printf("It's True"); // 显示 It's True
if(isspace('\r')) // 回车 printf("It's True"); // 显示 It's True
return 0; } iscntrl()函数的作用是判断一个控制符(ascii 码 0-31 之间的字符): #include <stdio.h> #include <ctype.h> int main(void) {
int fgetc(FILE *stream); int getc(FILE *stream);/* 与 fgetc 相同但是可以用宏实现该函数 */ 写一个字符到一个流
if(isalnum('a')) printf("It's True"); // 显示 It's True
if(isalnum(4)) printf("It's True"); // 显示 ''
C语言常用头文件

头文件 time.h
日期和时间函数: 本类别给出时间和日期处理函数
----------------------------------------
时间操作函数得到处理器时间 clock
得到时间差 difftime
设置时间 mktime
1 错误处理 errno.h
2 字符处理 ctype.h
3 地区化 local.h
4 数学函数 math.h
5 信号处理 signal.h
6 输入输出 stdio.h
7 实用工具程序 stdlib.h
8 字符串处理 string.h
C标准中的数据格式并不符合IEEE754标准,一些C语言编译器却遵循IEEE754(例如frinklin C51)
----------------------------------------
反余弦 acos
反正弦 asin
反正切 atan
错误处理函数
错误清除 clearerr
文件结尾判断 feof
文件错误检测 ferror
得到错误提示字符串 perror
头文件 stdlib.h
实用工具函数: 本分类给出了一些函数无法按以上分类,但又是编程所必须要的。
自然对数 log
以10为底的对数 log10
浮点数分解函数 modf
幂函数 pow
平方根函数 sqrt
求下限接近整数 ceil
绝对值 fabs
求上限接近整数 floor
求余数 fmod
头文件 setjmp.h io.h
本分类函数用于实现在不同底函数之间直接跳转代码。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
头文件ctype.h
函数列表<>
函数类别函数用途详细说明
字符测试是否字母和数字isalnum
是否字母isalpha
是否控制字符iscntrl
是否数字isdigit
是否可显示字符(除空格外)isgraph
是否可显示字符(包括空格)isprint
是否既不是空格,又不是字母和数字的可显示字符ispunct 是否空格isspace
是否大写字母isupper
是否16进制数字(0-9,A-F)字符isxdigit
字符大小写转换函数转换为大写字母toupper
转换为小写字母tolower
地区化
本类别的函数用于处理不同国家的语言差异。
头文件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
整数截断,绝对值和求余数函数求下限接近整数ceil
绝对值fabs
求上限接近整数floor
求余数fmod
本分类函数用于实现在不同底函数之间直接跳转代码。
头文件setjmp.h io.h
函数列表
函数类别函数用途详细说明
保存调用环境setjmp
恢复调用环境longjmp
信号处理
该分类函数用于处理那些在程序执行过程中发生例外的情况。
头文件signal.h
函数列表
函数类别函数用途详细说明
指定信号处理函数signal
发送信号raise
可变参数处理
本类函数用于实现诸如printf,scanf等参数数量可变底函数。
头文件stdarg.h
函数列表
函数类别函数用途详细说明
可变参数访问宏可变参数开始宏va_start
可变参数结束宏va_end
可变参数访问宏访问下一个可变参数宏va_arg
输入输出函数
该分类用于处理包括文件、控制台等各种输入输出设备,各种函数以“流”的方式实现
头文件stdio.h
函数列表
函数类别函数用途详细说明
文件操作
删除文件remove
修改文件名称rename
生成临时文件名称tmpfile
得到临时文件路径tmpnam
文件访问关闭文件fclose
刷新缓冲区fflush
打开文件fopen
将已存在的流指针和新文件连接freopen 设置磁盘缓冲区setbuf
设置磁盘缓冲区setvbuf
格式化输入与输出函数格式输出fprintf 格式输入fscanf
格式输出(控制台)printf
格式输入(控制台)scanf
格式输出到缓冲区sprintf
从缓冲区中按格式输入sscanf
格式化输出vfprintf
格式化输出vprintf
格式化输出vsprintf
字符输入输出函数输入一个字符fgetc 字符串输入fgets
字符输出fputc
字符串输出fputs
字符输入(控制台)getc
字符输入(控制台)getchar
字符串输入(控制台)gets
字符输出(控制台) putc
字符输出(控制台) putchar
字符串输出(控制台) puts
字符输出到流的头部ungetc
直接输入输出直接流读操作fread
直接流写操作fwrite
文件定位函数得到文件位置fgetpos
文件位置移动fseek
文件位置设置fsetpos
得到文件位置ftell
文件位置复零位remind
错误处理函数错误清除clearerr
文件结尾判断feof
文件错误检测ferror
得到错误提示字符串perror
实用工具函数
本分类给出了一些函数无法按以上分类,但又是编程所必须要的。
头文件stdlib.h
函数列表
函数类别函数用途详细说明
字符串转换函数字符串转换为整数atoi
字符串转换为长整数atol
字符串转换为浮点数strtod
字符串转换为长整数strtol
字符串转换为无符号长整型strtoul
伪随机序列产生函数产生随机数rand
设置随机函数的起动数值srand
存储管理函数分配存储器calloc
释放存储器free
存储器分配malloc
重新分配存储器realloc
环境通信中止程序abort
退出程序执行,并清除环境变量atexit
退出程序执行exit
读取环境参数getenv
程序挂起,临时执行一个其他程序system
搜索和排序工具二分查找(数据必须已排序)bsearch 快速排序qsort
整数运算函数求绝对值abs
div
得到除法运算底商和余数
求长整形底绝对值labs
求长整形除法的商和余数ldiv
多字节字符函数得到多字节字符的字节数mblen
得到多字节字符的字节数mbtowc
多字节字符转换wctomb
多字节字符的字符串操作将多字节串转换为整数数组mbstowcs
将多字节串转换为字符数组mcstowbs
字符串处理
本分类的函数用于对字符串进行合并、比较等操作
头文件string.h
函数列表
函数类别函数用途详细说明
字符串拷贝块拷贝(目的和源存储区不可重叠)memcpy 块拷贝(目的和源存储区可重叠)memmove
串拷贝strcpy
按长度的串拷贝strncpy
将串拷贝到新建的位置处strdup
字符串连接函数串连接strcat
按长度连接字符串strncat
串比较函数块比较memcmp
字符串比较strcmp
字符串比较(用于非英文字符)strcoll
按长度对字符串比较strncmp
字符串转换strxfrm
字符与字符串查找字符查找memchr
字符查找strchr
在串中查找指定字符集的子集的第一次出现strcspn 字符串查找strpbrk
在串中查找指定字符集的子集的第一次出现strspn 在串中查找指定字符串的第一次出现strstr
字符串分解strtok
杂类函数字符串设置memset
错误字符串映射strerror
求字符串长度strlen
日期和时间函数
本类别给出时间和日期处理函数
头文件time.h
函数列表
函数类别函数用途详细说明
时间操作函数得到处理器时间clock
得到时间差difftime
设置时间mktime
得到时间time
时间转换函数得到以ASCII码表示的时间asctime 得到字符串表示的时间ctime
得到指定格式的时间strftime
函数库未来的发展方向
本部分用于说明各类别函数库在将来如何发展。
序号库类别头文件详细说明
1 错误处理errno.h
2 字符处理ctype.h
3 地区化local.h
4 数学函数math.h
5 信号处理signal.h
6 输入输出stdio.h
7 实用工具程序stdlib.h
8 字符串处理string.h。