摘要: 文件打开 fopen() 返回FILE* 对象,如果打开失败返回NULL,错误代码存入errno中 申明FILE* stream_1,stream_2 //两个文件流 //注明: ”r+”打开读写文件。”r”打开只读文件。//文件必须存在 “w+”打开读写文件。”w”打开只写文件。//文件不存在自动 阅读全文
posted @ 2018-08-28 13:13 ChaosBlog 阅读(174) 评论(0) 推荐(0)
摘要: 动态分配和释放存储单元 malloc(size):内存动态存储空间中分配长度为size的连续空间(单位是Byte字节),返回起始地址,注意类型强制转换【int* p; p=(int*)malloc(size);】【p本身返回void】 calloc(n,size):内存动态存储区中分配n个长度为si 阅读全文
posted @ 2018-08-28 12:00 ChaosBlog 阅读(237) 评论(0) 推荐(0)
摘要: 结构体 struct node { int data; char sex; }s1,s2; // 变量s1,s2 typedef struct node { int data; char sex; }SS; // 类型名SS typedef 存在类型名 自定义类型名 结构体指针 typedef st 阅读全文
posted @ 2018-08-28 11:57 ChaosBlog 阅读(1082) 评论(0) 推荐(0)