摘要: #pragma pack(4)INT16U *D[D_Number];#pragma pack()#pragma pack(n)解释一:每个特定平台上的编译器都有自己的默认“对齐系数”(也叫对齐模数)。程序员可以通过预编译命令#pragma pack(n),n=1,2,4,8,16来改变这一系数,... 阅读全文
posted @ 2015-12-04 16:46 china_sunlu_cn 阅读(1184) 评论(0) 推荐(0)
摘要: #define PrgFileNameFormatEx "O%04ld.txt"sprintf(Temp,PrgFileNameFormatEx,(long)(data1->Pcode))int sprintf( char *buffer, const char *format [, argumen... 阅读全文
posted @ 2015-12-04 16:15 china_sunlu_cn 阅读(639) 评论(0) 推荐(0)
摘要: strncpy()函数原型:extern char *strncpy(char *dest, char *src, int n);用法:#include 功能:把src所指由NULL结束的字符串的前n个字节复制到dest所指的数组中。说明:如果src的前n个字节不含NULL字符,则结果不会以NULL... 阅读全文
posted @ 2015-12-04 16:06 china_sunlu_cn 阅读(1316) 评论(0) 推荐(0)
摘要: 头文件:#include strcmp() 用来比较字符串(区分大小写),其原型为: int strcmp(const char *s1, const char *s2);参数 - s1, s2 为需要比较的两个字符串。 字符串大小的比较是以ASCII 码表上的顺序来决定,此顺序亦为字符的值... 阅读全文
posted @ 2015-12-04 15:57 china_sunlu_cn 阅读(650) 评论(0) 推荐(0)