is ok?
#include<stdio.h> #include<STRING.H> void main() { FILE * fp; fp=fopen("noexist","a+"); if(fp==NULL) return; char yufei[1024]; strcpy(yufei, "libiao"); printf("yufei"); //yufei="wqeqw"; fputs (yufei,strlen(yufei),fp); // fget(yufei,1024,fp);/*读入一行*/ fclose(fp); }
#include<stdio.h> #include<STRING.H> void main() { FILE * fp; fp=fopen("noexist","a+"); if(fp==NULL) return; char yufei[1024]; strcpy(yufei, "libiao"); printf("yufei"); //yufei="wqeqw"; fputs (yufei,strlen(yufei),fp); // fget(yufei,1024,fp);/*读入一行*/ fclose(fp); }
LUF