This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to use fprintf

Hi

I have problem using fprintf. I have #include <stdio.h>, and printf works just fine. Why is the fprintf not working?

I have tried with this toy code:

FILE *fid;

fid = fopen("test","w");
  
 fprintf(fid,"Hello, world\n");
  
 fclose(fid);

 

But the compiler complains: error: unrecognized token.

Any idea why?

Thanks in advance!