头文件常用函数整理

#include<stdio.h>  // 标准输入输出函数
 sprintf(buf,"%d",&a);
 sscanf(a,%8d,n);
#include<stdlib.h>  // 标准库函数
#include<string.h>  // 字符串处理函数
 memset(a,0,sizeof(a));
 strstr(s1,s2); 在s1中查找s2,若是则输出首次出现的地址,否则输出NULL
 strchr(s,c);   查找字符,同上
 strcpy(b,a);   拷贝a到b(覆盖)
 strcmp(a,b)   若a==b返回0,a>b返回正数,a<b返回负数
#include<math.h> // 数学函数库
 sqrt();
 pow();
 ceil(double x); 向上取整(返回大于或等于表达式的最小整数)
 floor(double x);向下取整
#include<time.h> // 产生随机数种子
#include<windows.h> // Windows指令库
#include<ctype.h>  // 字符操作函数
#include <dir.h> //导入头文件
#include<process.h> //包含用于和宏指令的作用声明与螺纹和过程一起使用
#include<conio.h>  // 控制台输入输出函数,虽然不是标准头文件,但是大部分编译器都支持
#include<algorithm>//STL使用头文件

猜你喜欢

转载自blog.csdn.net/qq_30007603/article/details/81153959
今日推荐