include <stdio.h>#include <stdlib.h> #define SIZE_view 50 struct view_info {int id;char name[20];int code;char shortname[20];char LName[100];}views[SIZE_view];int read() {FILE *fp;int n = 0;if((fp = fopen("1.txt","rt")) == NULL) {printf("不能打开数据文...
怎么在一个TXT文件..荤菜:鱼香肉丝 15元,水煮牛肉 20元,辣子鸡丁 25元素菜:麻婆豆腐 8元,鱼香茄子 6元汤菜:番茄蛋汤 9元,青菜豆腐汤 6元这个是dish.txt文件,比如我要在第2行末尾添加一个 韭菜 8
errno_t ecode;if ((ecode = fopen_s(&fp,"E:\\exp01.txt", "w")) == 0)fopen_s函数原型:errno_t fopen_s( FILE** pFile, const char *filename, const char *mode );函数参数 pFile:文件指针将接收到打开的文件指针指向的指针。infilename:文件名。inmode:允许的访问类型。--- ...