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

html - Cut text on left side inside button while centering -

plugins - CodeIgniter support on netbeans 8.0 -

php - Selecting items from MySQL for a status update feed efficiently while accounting for possible spam -