发布网友 发布时间:2022-04-21 08:30
共1个回答
热心网友 时间:2023-11-08 01:31
#include<stdio.h>
void main()
{
FILE *fp;
if((fp=fopen("data.txt","wt"))==NULL)
{
printf("Can't open the file!\nPress any key to exit!");
getch();
exit(0);
}
fprintf(fp,"日记内容");
fclose(fp);
}