Unexpected syntax error from MingW compiling a simple C program -


complete novice alert :

#include<stdio.h>  int main()  { puts("c rocks!");   return 0; }  

when compiled mingw, shows 2 errors:

  1. syntax error near unexpected token ( in beginning
  2. and int main ()

what wrong code?

i having issue. check illegal characters in path name such spaces or brackets. code looks correct issue isn't there. if else fails, go basics. make sure you're using "gcc file.c -o file.exe" output correct file. reason, forgot use 'gcc', though had been using mingw on month.


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -