资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

c语言函数库下载6 c语言库函数手册下载

VC6的msdn中怎么查C语言的库函数啊

你如果不是要全部阅读MSDN里所有东西的话,据点索引,查找你要找的函数。

成都创新互联是一家集网站建设,托克逊企业网站建设,托克逊品牌网站建设,网站定制,托克逊网站建设报价,网络营销,网络优化,托克逊网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。

MSDN里的函数基本上都是C语言的,只不过是被封装过的。

放心用就好了。

c语言库函数 下载

我有点呵呵

函数名: abort

功 能: 异常终止一个进程

用 法: void abort(void);

程序例:

#include stdio.h

#include stdlib.h

int main(void)

{

printf("Calling abort()\n");

abort();

return 0; /* This is never reached */

}

函数名: abs

功 能: 求整数的绝对值

用 法: int abs(int i);

程序例:

#include stdio.h

#include math.h

int main(void)

{

int number = -1234;

printf("number: %d absolute value: %d\n", number, abs(number));

return 0;

}

函数名: absread, abswirte

功 能: 绝对磁盘扇区读、写数据

用 法: int absread(int drive, int nsects, int sectno, void *buffer);

int abswrite(int drive, int nsects, in tsectno, void *buffer);

程序例:

/* absread example */

#include stdio.h

#include conio.h

#include process.h

#include dos.h

int main(void)

{

int i, strt, ch_out, sector;

char buf[512];

printf("Insert a diskette into drive A and press any key\n");

getch();

sector = 0;

if (absread(0, 1, sector, buf) != 0)

{

perror("Disk problem");

exit(1);

}

printf("Read OK\n");

strt = 3;

for (i=0; i80; i++)

{

ch_out = buf[strt+i];

putchar(ch_out);

}

printf("\n");

return(0);

}

函数名: access

功 能: 确定文件的访问权限

用 法: int access(const char *filename, int amode);

程序例:

#include stdio.h

#include io.h

int file_exists(char *filename);

int main(void)

{

printf("Does NOTEXIST.FIL exist: %s\n",

file_exists("NOTEXISTS.FIL") ? "YES" : "NO");

return 0;

}

int file_exists(char *filename)

{

return (access(filename, 0) == 0);

}

函数名: acos

功 能: 反余弦函数

用 法: double acos(double x);

程序例:

#include stdio.h

#include math.h

int main(void)

{

double result;

double x = 0.5;

result = acos(x);

printf("The arc cosine of %lf is %lf\n", x, result);

return 0;

}

函数名: allocmem

功 能: 分配DOS存储段

用 法: int allocmem(unsigned size, unsigned *seg);

程序例:

#include dos.h

#include alloc.h

#include stdio.h

int main(void)

{

unsigned int size, segp;

int stat;

size = 64; /* (64 x 16) = 1024 bytes */

stat = allocmem(size, segp);

if (stat == -1)

printf("Allocated memory at segment: %x\n", segp);

else

printf("Failed: maximum number of paragraphs available is %u\n",

stat);

return 0;

}

函数名: arc

功 能: 画一弧线

用 法: void far arc(int x, int y, int stangle, int endangle, int radius);

程序例:

#include graphics.h

#include stdlib.h

#include stdio.h

#include conio.h

int main(void)

{

/* request auto detection */

int gdriver = DETECT, gmode, errorcode;

int midx, midy;

int stangle = 45, endangle = 135;

int radius = 100;

/* initialize graphics and local variables */

initgraph(gdriver, gmode, "");

/* read result of initialization */

errorcode = graphresult(); /* an error occurred */

if (errorcode != grOk)

{

printf("Graphics error: %s\n", grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1); /* terminate with an error code */

}

midx = getmaxx() / 2;

midy = getmaxy() / 2;

setcolor(getmaxcolor());

/* draw arc */

arc(midx, midy, stangle, endangle, radius);

/* clean up */

getch();

closegraph();

return 0;

}

函数名: asctime

功 能: 转换日期和时间为ASCII码

用 法: char *asctime(const struct tm *tblock);

程序例:

#include stdio.h

#include string.h

#include time.h

int main(void)

{

struct tm t;

char str[80];

/* sample loading of tm structure */

t.tm_sec = 1; /* Seconds */

t.tm_min = 30; /* Minutes */

t.tm_hour = 9; /* Hour */

t.tm_mday = 22; /* Day of the Month */

t.tm_mon = 11; /* Month */

t.tm_year = 56; /* Year - does not include century */

t.tm_wday = 4; /* Day of the week */

t.tm_yday = 0; /* Does not show in asctime */

t.tm_isdst = 0; /* Is Daylight SavTime; does not show in asctime */

/* converts structure to null terminated

string */

strcpy(str, asctime(t));

printf("%s\n", str);

return 0;

}

函数名: asin

功 能: 反正弦函数

用 法: double asin(double x);

程序例:

#include stdio.h

#include math.h

int main(void)

{

double result;

double x = 0.5;

result = asin(x);

printf("The arc sin of %lf is %lf\n", x, result);

return(0);

}

函数名: assert

功 能: 测试一个条件并可能使程序终止

用 法: void assert(int test);

程序例:

#include assert.h

#include stdio.h

#include stdlib.h

struct ITEM {

int key;

int value;

};

/* add item to list, make sure list is not null */

void additem(struct ITEM *itemptr) {

assert(itemptr != NULL);

/* add item to list */

}

int main(void)

{

additem(NULL);

return 0;

}

函数名: atan

功 能: 反正切函数

用 法: double atan(double x);

程序例:

#include stdio.h

#include math.h

int main(void)

{

double result;

double x = 0.5;

result = atan(x);

printf("The arc tangent of %lf is %lf\n", x, result);

return(0);

}

函数名: atan2

功 能: 计算Y/X的反正切值

用 法: double atan2(double y, double x);

程序例:

#include stdio.h

#include math.h

int main(void)

{

double result;

double x = 90.0, y = 45.0;

result = atan2(y, x);

printf("The arc tangent ratio of %lf is %lf\n", (y / x), result);

return 0;

}

函数名: atexit

功 能: 注册终止函数

用 法: int atexit(atexit_t func);

程序例:

#include stdio.h

#include stdlib.h

void exit_fn1(void)

{

printf("Exit function #1 called\n");

}

void exit_fn2(void)

{

printf("Exit function #2 called\n");

}

int main(void)

{

/* post exit function #1 */

atexit(exit_fn1);

/* post exit function #2 */

atexit(exit_fn2);

return 0;

}

函数名: atof

功 能: 把字符串转换成浮点数

用 法: double atof(const char *nptr);

程序例:

#include stdlib.h

#include stdio.h

int main(void)

{

float f;

char *str = "12345.67";

f = atof(str);

printf("string = %s float = %f\n", str, f);

return 0;

}

函数名: atoi

功 能: 把字符串转换成长整型数

用 法: int atoi(const char *nptr);

程序例:

#include stdlib.h

#include stdio.h

int main(void)

{

int n;

char *str = "12345.67";

n = atoi(str);

printf("string = %s integer = %d\n", str, n);

return 0;

}

函数名: atol

功 能: 把字符串转换成长整型数

用 法: long atol(const char *nptr);

程序例:

#include stdlib.h

#include stdio.h

int main(void)

{

long l;

char *str = "98765432";

l = atol(lstr);

printf("string = %s integer = %ld\n", str, l);

return(0);

}

目录

Null's

c语言的图形函数库有哪些

图形和图像函数包含在graphics.h里面(一) 像素函数56. putpiel() 画像素点函数57. getpixel()返回像素色函数(二) 直线和线型函数58. line() 画线函数59. lineto() 画线函数60. linerel() 相对画线函数61. setlinestyle() 设置线型函数62. getlinesettings() 获取线型设置函数63. setwritemode() 设置画线模式函数(三)、多边形函数64. rectangle() 画矩形函数65. bar() 画条函数66. bar3d() 画条块函数67. drawpoly() 画多边形函数(四)、 圆、弧和曲线函数68. getaspectratio()获取纵横比函数69. circle()画圆函数70. arc() 画圆弧函数71. ellipse()画椭圆弧函数72. fillellipse() 画椭圆区函数73. pieslice() 画扇区函数74. sector() 画椭圆扇区函数75. getarccoords()获取圆弧坐标函数(五)、 填充函数76. setfillstyle() 设置填充图样和颜色函数77. setfillpattern() 设置用户图样函数78. floodfill() 填充闭域函数79. fillpoly() 填充多边形函数80. getfillsettings() 获取填充设置函数81. getfillpattern() 获取用户图样设置函数(六)、图像函数82. imagesize() 图像存储大小函数83. getimage() 保存图像函数84. putimage() 输出图像函数四、图形和图像函数对许多图形应用程序,直线和曲线是非常有用的。但对有些图形只能靠操作单个像素才能画出。当然如果没有画像素的功能,就无法操作直线和曲线的函数。而且通过大规模使用像素功能,整个图形就可以保存、写、擦除和与屏幕上的原有图形进行叠加。(一) 像素函数56. putpixel() 画像素点函数功能: 函数putpixel() 在图形模式下屏幕上画一个像素点。用法: 函数调用方式为void putpixel(int x,int y,int color);说明: 参数x,y为像素点的坐标,color是该像素点的颜色,它可以是颜色符号名,也可以是整型色彩值。此函数相应的头文件是graphics.h返回值: 无例: 在屏幕上(6,8)处画一个红色像素点:putpixel(6,8,RED);57. getpixel()返回像素色函数功能: 函数getpixel()返回像素点颜色值。用法: 该函数调用方式为int getpixel(int x,int y);说明: 参数x,y为像素点坐标。函数的返回值可以不反映实际彩色值,这取决于调色板的设置情况(参见setpalette()函数)。这个函数相应的头文件为graphics.h返回值: 返回一个像素点色彩值。例: 把屏幕上(8,6)点的像素颜色值赋给变量color。color=getpixel(8,6);

求C语言库函数大全!请大家帮忙!谢了!

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

int isalnum(int ch) 若ch是字母('A'-'Z','a'-'z')或数字('0'-'9')

返回非0值,否则返回0

int isascii(int ch) 若ch是字符(ASCII码中的0-127)返回非0值,否则返回0

int iscntrl(int ch) 若ch是作废字符(0x7F)或普通控制字符(0x00-0x1F)

返回非0值,否则返回0

int isdigit(int ch) 若ch是数字('0'-'9')返回非0值,否则返回0

int isgraph(int ch) 若ch是可打印字符(不含空格)(0x21-0x7E)返回非0值,否则返回0

int islower(int ch) 若ch是小写字母('a'-'z')返回非0值,否则返回0

int isprint(int ch) 若ch是可打印字符(含空格)(0x20-0x7E)返回非0值,否则返回0

int ispunct(int ch) 若ch是标点字符(0x00-0x1F)返回非0值,否则返回0

int isspace(int ch) 若ch是空格(' '),水平制表符('\t'),回车符('\r'),

走纸换行('\f'),垂直制表符('\v'),换行符('\n')

返回非0值,否则返回0

int isupper(int ch) 若ch是大写字母('A'-'Z')返回非0值,否则返回0

int isxdigit(int ch) 若ch是16进制数('0'-'9','A'-'F','a'-'f')返回非0值,

否则返回0

int tolower(int ch) 若ch是大写字母('A'-'Z')返回相应的小写字母('a'-'z')

int toupper(int ch) 若ch是小写字母('a'-'z')返回相应的大写字母('A'-'Z')

========数学函数(原型声明所在头文件为math.h、stdlib.h、string.h、float.h)===========

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

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

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

long labs(long n) 返回长整型参数n的绝对值

double exp(double x) 返回指数函数ex的值

double frexp(double value,int *eptr) 返回value=x*2n中x的值,n存贮在eptr中

double ldexp(double value,int exp); 返回value*2exp的值

double log(double x) 返回logex的值

double log10(double x) 返回log10x的值

double pow(double x,double y) 返回xy的值

double pow10(int p) 返回10p的值

double sqrt(double x) 返回x的开方

double acos(double x) 返回x的反余弦cos-1(x)值,x为弧度

double asin(double x) 返回x的反正弦sin-1(x)值,x为弧度

double atan(double x) 返回x的反正切tan-1(x)值,x为弧度

double atan2(double y,double x) 返回y/x的反正切tan-1(x)值,y的x为弧度

double cos(double x) 返回x的余弦cos(x)值,x为弧度

double sin(double x) 返回x的正弦sin(x)值,x为弧度

double tan(double x) 返回x的正切tan(x)值,x为弧度

double cosh(double x) 返回x的双曲余弦cosh(x)值,x为弧度

double sinh(double x) 返回x的双曲正弦sinh(x)值,x为弧度

double tanh(double x) 返回x的双曲正切tanh(x)值,x为弧度

double hypot(double x,double y) 返回直角三角形斜边的长度(z),

x和y为直角边的长度,z2=x2+y2

double ceil(double x) 返回不小于x的最小整数

double floor(double x) 返回不大于x的最大整数

void srand(unsigned seed) 初始化随机数发生器

int rand() 产生一个随机数并返回这个数

double poly(double x,int n,double c[])从参数产生一个多项式

double modf(double value,double *iptr)将双精度数value分解成尾数和阶

double fmod(double x,double y) 返回x/y的余数

double frexp(double value,int *eptr) 将双精度数value分成尾数和阶

double atof(char *nptr) 将字符串nptr转换成浮点数并返回这个浮点数

double atoi(char *nptr) 将字符串nptr转换成整数并返回这个整数

double atol(char *nptr) 将字符串nptr转换成长整数并返回这个整数

char *ecvt(double value,int ndigit,int *decpt,int *sign)

将浮点数value转换成字符串并返回该字符串

char *fcvt(double value,int ndigit,int *decpt,int *sign)

将浮点数value转换成字符串并返回该字符串

char *gcvt(double value,int ndigit,char *buf)

将数value转换成字符串并存于buf中,并返回buf的指针

char *ultoa(unsigned long value,char *string,int radix)

将无符号整型数value转换成字符串并返回该字符串,radix为转换时所用基数

char *ltoa(long value,char *string,int radix)

将长整型数value转换成字符串并返回该字符串,radix为转换时所用基数

char *itoa(int value,char *string,int radix)

将整数value转换成字符串存入string,radix为转换时所用基数

double atof(char *nptr) 将字符串nptr转换成双精度数,并返回这个数,错误返回0

int atoi(char *nptr) 将字符串nptr转换成整型数, 并返回这个数,错误返回0

long atol(char *nptr) 将字符串nptr转换成长整型数,并返回这个数,错误返回0

double strtod(char *str,char **endptr)将字符串str转换成双精度数,并返回这个数,

long strtol(char *str,char **endptr,int base)将字符串str转换成长整型数,

并返回这个数,

int matherr(struct exception *e)

用户修改数学错误返回信息函数(没有必要使用)

double _matherr(_mexcep why,char *fun,double *arg1p,

double *arg2p,double retval)

用户修改数学错误返回信息函数(没有必要使用)

unsigned int _clear87() 清除浮点状态字并返回原来的浮点状态

void _fpreset() 重新初使化浮点数学程序包

unsigned int _status87() 返回浮点状态字

============目录函数(原型声明所在头文件为dir.h、dos.h)================

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

功返回0

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

返回0

pathname为指定的目录名和文件名,如"C:\\WPS\\TXT"

ffblk为指定的保存文件信息的一个结构,定义如下:

┏━━━━━━━━━━━━━━━━━━┓

┃struct ffblk ┃

┃{ ┃

┃ char ff_reserved[21]; /*DOS保留字*/┃

┃ char ff_attrib; /*文件属性*/ ┃

┃ int ff_ftime; /*文件时间*/ ┃

┃ int ff_fdate; /*文件日期*/ ┃

┃ long ff_fsize; /*文件长度*/ ┃

┃ char ff_name[13]; /*文件名*/ ┃

┃} ┃

┗━━━━━━━━━━━━━━━━━━┛

attrib为文件属性,由以下字符代表

┏━━━━━━━━━┳━━━━━━━━┓

┃FA_RDONLY 只读文件┃FA_LABEL 卷标号┃

┃FA_HIDDEN 隐藏文件┃FA_DIREC 目录 ┃

┃FA_SYSTEM 系统文件┃FA_ARCH 档案 ┃

┗━━━━━━━━━┻━━━━━━━━┛

例:

struct ffblk ff;

findfirst("*.wps",ff,FA_RDONLY);

int findnext(struct ffblk *ffblk) 取匹配finddirst的文件,成功返回0

void fumerge(char *path,char *drive,char *dir,char *name,char *ext)

此函数通过盘符drive(C:、A:等),路径dir(\TC、\BC\LIB等),

文件名name(TC、WPS等),扩展名ext(.EXE、.COM等)组成一个文件名

存与path中.

int fnsplit(char *path,char *drive,char *dir,char *name,char *ext)

此函数将文件名path分解成盘符drive(C:、A:等),路径dir(\TC、\BC\LIB等),

文件名name(TC、WPS等),扩展名ext(.EXE、.COM等),并分别存入相应的变量中.

int getcurdir(int drive,char *direc) 此函数返回指定驱动器的当前工作目录名称

drive 指定的驱动器(0=当前,1=A,2=B,3=C等)

direc 保存指定驱动器当前工作路径的变量 成功返回0

char *getcwd(char *buf,iint n) 此函数取当前工作目录并存入buf中,直到n个字

节长为为止.错误返回NULL

int getdisk() 取当前正在使用的驱动器,返回一个整数(0=A,1=B,2=C等)

int setdisk(int drive) 设置要使用的驱动器drive(0=A,1=B,2=C等),

返回可使用驱动器总数

int mkdir(char *pathname) 建立一个新的目录pathname,成功返回0

int rmdir(char *pathname) 删除一个目录pathname,成功返回0

char *mktemp(char *template) 构造一个当前目录上没有的文件名并存于template中

char *searchpath(char *pathname) 利用MSDOS找出文件filename所在路径,

,此函数使用DOS的PATH变量,未找到文件返回NULL

===========进程函数(原型声明所在头文件为stdlib.h、process.h)===========

void abort() 此函数通过调用具有出口代码3的_exit写一个终止信息于stderr,

并异常终止程序。无返回值

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

int execl( char *pathname,char *arg0,char *arg1,…,char *argn,NULL)

int execle( char *pathname,char *arg0,char *arg1,…,

char *argn,NULL,char *envp[])

int execlp( char *pathname,char *arg0,char *arg1,…,NULL)

int execlpe(char *pathname,char *arg0,char *arg1,…,NULL,char *envp[])

int execv( char *pathname,char *argv[])

int execve( char *pathname,char *argv[],char *envp[])

int execvp( char *pathname,char *argv[])

int execvpe(char *pathname,char *argv[],char *envp[])

exec函数族装入并运行程序pathname,并将参数

arg0(arg1,arg2,argv[],envp[])传递给子程序,出错返回-1

在exec函数族中,后缀l、v、p、e添加到exec后,

所指定的函数将具有某种操作能力

有后缀 p时,函数可以利用DOS的PATH变量查找子程序文件。

l时,函数中被传递的参数个数固定。

v时,函数中被传递的参数个数不固定。

e时,函数传递指定参数envp,允许改变子进程的环境,

无后缀e时,子进程使用当前程序的环境。

void _exit(int status)终止当前程序,但不清理现场

void exit(int status) 终止当前程序,关闭所有文件,写缓冲区的输出(等待输出),

并调用任何寄存器的"出口函数",无返回值

int spawn…运行子程序

int spawnl( int mode,char *pathname,char *arg0,char *arg1,…,

char *argn,NULL)

int spawnle( int mode,char *pathname,char *arg0,char *arg1,…,

char *argn,NULL,char *envp[])

int spawnlp( int mode,char *pathname,char *arg0,char *arg1,…,

char *argn,NULL)

int spawnlpe(int mode,char *pathname,char *arg0,char *arg1,…,

char *argn,NULL,char *envp[])

int spawnv( int mode,char *pathname,char *argv[])

int spawnve( int mode,char *pathname,char *argv[],char *envp[])

int spawnvp( int mode,char *pathname,char *argv[])

int spawnvpe(int mode,char *pathname,char *argv[],char *envp[])

spawn函数族在mode模式下运行子程序pathname,并将参数

arg0(arg1,arg2,argv[],envp[])传递给子程序.出错返回-1

mode为运行模式

mode为 P_WAIT 表示在子程序运行完后返回本程序

P_NOWAIT 表示在子程序运行时同时运行本程序(不可用)

P_OVERLAY表示在本程序退出后运行子程序

在spawn函数族中,后缀l、v、p、e添加到spawn后,

所指定的函数将具有某种操作能力

有后缀 p时, 函数利用DOS的PATH查找子程序文件

l时, 函数传递的参数个数固定.

v时, 函数传递的参数个数不固定.

e时, 指定参数envp可以传递给子程序,允许改变子程序运行环境.

当无后缀e时,子程序使用本程序的环境.

int system(char *command) 将MSDOS命令command传递给DOS执行

======转换子程序(函数原型所在头文件为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转换成字符串并返回该字符串

char *gcvt(double value,int ndigit,char *buf)

将数value转换成字符串并存于buf中,并返回buf的指针

char *ultoa(unsigned long value,char *string,int radix)

将无符号整型数value转换成字符串并返回该字符串,radix为转换时所用基数

char *ltoa(long value,char *string,int radix)

将长整型数value转换成字符串并返回该字符串,radix为转换时所用基数

char *itoa(int value,char *string,int radix)

将整数value转换成字符串存入string,radix为转换时所用基数

double atof(char *nptr) 将字符串nptr转换成双精度数,并返回这个数,错误返回0

int atoi(char *nptr) 将字符串nptr转换成整型数, 并返回这个数,错误返回0

long atol(char *nptr) 将字符串nptr转换成长整型数,并返回这个数,错误返回0

double strtod(char *str,char **endptr)将字符串str转换成双精度数,并返回这个数,

long strtol(char *str,char **endptr,int base)将字符串str转换成长整型数,

并返回这个数,

int toascii(int c) 返回c相应的ASCII

int tolower(int ch) 若ch是大写字母('A'-'Z')返回相应的小写字母('a'-'z')

int _tolower(int ch) 返回ch相应的小写字母('a'-'z')

int toupper(int ch) 若ch是小写字母('a'-'z')返回相应的大写字母('A'-'Z')

int _toupper(int ch) 返回ch相应的大写字母('A'-'Z')


文章题目:c语言函数库下载6 c语言库函数手册下载
文章URL:http://cdkjz.cn/article/ddipdsh.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

大客户专线   成都:13518219792   座机:028-86922220