0

    C++中怎么暂停几秒-CSDN博客

    2024.05.04 | admin | 16次围观

    C++中怎么暂停几秒-CSDN博客

      C函数库手册,按照函数功能来分类

      分类函数,所在函数库为ctype.h

      int isalpha(int ch) 若ch 是字母('A'-'Z','a'-'z')返回非0 值,否则返回0

      int isalnum(int ch) 若ch 是字母('A'-'Z','a'-'z')或数字('0'-'9')返回非0 值,否则返回0

      ......

      数学函数,所在函数库为math.h、stdlib.h、string.h、float.h

      int abs(int i) 返回整型参数i 的绝对值

      double cabs(struct complex znum) 返回复数znum 的绝对值

      double fabs(double x) 返回双精度参数x 的绝对值

      ......

      目录函数,所在函数库为dir.h、dos.h

      int chdir(char *path) 使指定的目录path(如:"C:\WPS")变成当前的工作目录,成

      功返回0

      int findfirst(char *pathname,struct ffblk *ffblk,int attrib)查找指定的文件,成功

      返回0

      ......

      进程函数,所在函数库为stdlib.h、process.h

      void abort() 此函数通过调用具有出口代码3 的_exit 写一个终止信息于stderr,并异常终止程序。无返回值

      int exec…装入和运行其它程序

      ......

      转换子程序,函数库为math.h、stdlib.h、ctype.h、float.h

      char *ecvt(double value,int ndigit,int *decpt,int *sign)将浮点数value 转换成字符串并返回该字符串

      char *fcvt(double value,int ndigit,int *decpt,int *sign)将浮点数value 转换成字符串并返回该字符串

      ......

      诊断函数,所在函数库为assert.h、math.h

      void assert(int test) 一个扩展成if 语句那样的宏,如果test 测试失败,就显示一个信息并异常终止程序,无返回值

      void perror(char *string) 本函数将显示最近一次的错误信息,格式如下:字符串string:错误信息

      ......

      输入输出子程序,函数库为io.h、conio.h、stat.h、dos.h、stdio.h、signal.h

      int kbhit() 本函数返回最近所敲的按键

      int fgetchar() 从控制台(键盘)读一个字符,显示在屏幕上

      ......

      接口子程序,所在函数库为:dos.h、bios.h

      unsigned sleep(unsigned seconds)暂停seconds 微秒(百分之一秒)

      int unlink(char *filename)删除文件filename

      unsigned FP_OFF(void far *farptr)本函数用来取远指针farptr 的偏移量

      ......

      存贮分配子程序,所在函数库为dos.h、alloc.h、malloc.h、stdlib.h、process.h

      int allocmem(unsigned size,unsigned *seg)利用DOS 分配空闲的内存,size 为分配内存大小,seg 为分配后的内存指针

      int freemem(unsigned seg)释放先前由allocmem 分配的内存,seg 为指定的内存指针

      ......

      操作函数,所在函数库为string.h、mem.h

      mem…操作存贮数组

      ......

      ......

    版权声明

    本文仅代表作者观点,不代表xx立场。
    本文系作者授权xxx发表,未经许可,不得转载。

    发表评论