#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fp;
if((fp=fopen("g:\\a.txt","wb"))==NULL)
{
printf("\nopen file error");
getchar();
exit(1);
}
fputs("34234",fp);
fclose(fp);
if((fp=fopen("b.txt","wb"))==NULL)
{
printf("\nopen file error");
getchar();
exit(1);
}
fclose(fp);
return 0;
}
转载于:https://www.cnblogs.com/xiaohuihui123/p/4884619.html