上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 59 下一页

2016年5月4日

C语言 文件操作11--文件函数再讲 fseek()和ftell()

摘要: //文件函数再讲 //fseek(),ftell(), #define _CRT_SECURE_NO_WARNINGS #include #include void main(){ //定义文件路径 char *path = "E:\\Look\\b1.txt";//仅支持window char *path1 = "E:/Look/b1.txt";//支持window... 阅读全文

posted @ 2016-05-04 16:48 寒魔影 阅读(586) 评论(0) 推荐(0) 编辑

2016年5月2日

C语言 文件操作10--配置文件读写

摘要: //配置文件读写项目 #define _CRT_SECURE_NO_WARNINGS #include #include #include int writefile(const char *path/*in*/, char *pkey/*in*/, char *pvalue/*in*/){ int ERRO_MSG = 0; if (path == NULL) ... 阅读全文

posted @ 2016-05-02 16:08 寒魔影 阅读(2328) 评论(0) 推荐(0) 编辑

2016年5月1日

C语言 文件操作9--fgetc()和fputc()

摘要: //fgetc()和fputc() #define _CRT_SECURE_NO_WARNINGS #include #include #include //文本写文件 int writeWord(const char *path,const char *pword){ int ERRO_MSG = 0; int i = 0; if (path == NULL) ... 阅读全文

posted @ 2016-05-01 09:37 寒魔影 阅读(455) 评论(0) 推荐(0) 编辑

C语言 文件操作8--fputs()和fgets()

摘要: //fputs()和fgets() #define _CRT_SECURE_NO_WARNINGS #include #include #include //文本写文件 int writeWord(const char *path,const char *pword){ int ERRO_MSG = 0; if (path == NULL) { ERR... 阅读全文

posted @ 2016-05-01 08:46 寒魔影 阅读(288) 评论(0) 推荐(0) 编辑

2016年4月30日

C语言错误: HEAP CORRUPTION DETECTED

摘要: 程序源代码: 报错页面 错误解析: 这个错误是在释放字符串指针的时候报错,具体行数如图 错误原因: 通过对错误进行百度,我理解了这个错误的原因是,释放一个字符串指针,但是这个字符串指针被破坏了,举例说明: char *str=(char *)malloc(sizeof(char)*10);//分配了 阅读全文

posted @ 2016-04-30 17:43 寒魔影 阅读(6453) 评论(1) 推荐(1) 编辑

2016年4月24日

C语言 结构体中的成员域偏移量

摘要: //C语言中结构体中的成员域偏移量 #define _CRT_SECURE_NO_WARNINGS #include #include #include typedef struct _student{ char name[30];//32 int num; }Student; void main(){ Student *p = NULL; printf("... 阅读全文

posted @ 2016-04-24 12:49 寒魔影 阅读(1684) 评论(0) 推荐(0) 编辑

2016年4月22日

C语言中的深拷贝和浅拷贝

摘要: //C语言中的深拷贝和浅拷贝 #define _CRT_SECURE_NO_WARNINGS #include #include #include typedef struct _student{ char name[30]; char *title; int age; }Student; void main(){ Student s1; Stud... 阅读全文

posted @ 2016-04-22 16:23 寒魔影 阅读(4535) 评论(0) 推荐(0) 编辑

2016年4月12日

C语言 数组做函数参数不传数组个数的遍历方法

摘要: //数组做函数参数不传数组个数的遍历方法 #include #include #include void PrintfAK(char **pin){ int i = 0; //关键点:pin[i]!=NULL为终止条件 for (i = 0; pin[i]!=NULL; i++) { printf("%s\n", pin[i]); } }... 阅读全文

posted @ 2016-04-12 09:54 寒魔影 阅读(1501) 评论(0) 推荐(0) 编辑

2016年4月11日

C语言 数组做函数参数退化为指针的技术推演

摘要: //数组做函数参数退化为指针的技术推演 #include #include #include //一维数组做函数参数退化为指针的技术推演 void printfA(char * strarr[3]); //计算机中,数组都是线性存储,二维数组元素也是一个个的排列的 //例如: 1,2,3,4,5,6,7,8,9 像这组数据 我们可以认为是一维数组 int a[9]={1,2,3,... 阅读全文

posted @ 2016-04-11 12:01 寒魔影 阅读(1233) 评论(0) 推荐(0) 编辑

2016年4月9日

C语言 数组类型与数组指针类型

摘要: //数组类型与数组指针类型 #include #include #include void main(){ printf("\n-------数组类型----------\n"); { //定义一个数组类型 typedef int Myarr[5];//定义了一个int型有5个元素的数组类型 //定义一个数组类型变量 ... 阅读全文

posted @ 2016-04-09 15:37 寒魔影 阅读(1830) 评论(0) 推荐(0) 编辑

上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 59 下一页

导航