到目前为止,这是我的代码:
#include <stdio.h>
int main(void)
{
char filename[50]; /* for holding file's name */
FILE *fp; /* fp is the "file pointer" */
printf("Please enter the name of an input file: ");
scanf("%s", filename);
if (!(fp = fopen(filename, "w"))) /*w=write*/
fprintf(stderr, "unable to open file\a\n");
else {/* process file */
fprintf(fp, "Testing...\n");
}
return 0;
}
线
FILE *fp;
//is giving me an error Undefined Symbol "FILE"
线
fprintf(stderr, "unable to open file\a\n");
//is giving me an error Undefined Symbol "stderr"
我认为这些关键字是标准的 C/C++?他们为什么给我错误?