Keil中如何使用FILE指针创建文件?
时间:10-02
整理:3721RD
点击:
在keil中如何使用C库stdio.h中的FILE去创建一个文件。这样以便于调试的时候写Log。
eg:
FILE * fp
fp=fopen("test.log","w")
fprintf(fp,"this is testlog");
fprintf(fp,"address 0x1000 value is %d",&num);
fclose(fp);
eg:
FILE * fp
fp=fopen("test.log","w")
fprintf(fp,"this is testlog");
fprintf(fp,"address 0x1000 value is %d",&num);
fclose(fp);