代码贴打不开 临时储存点资料

#include <stdio.h> #include <time.h> int main() { char filename[] = "c:\\test.txt"; FILE* fp; time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); if((fp = fopen(filename,"a+")) == NULL) { return 0; } else { fputs(asctime (timeinfo),fp); } fclose(fp); return 0; }