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

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -