Beginner: syntax error before int main ()

后端 未结 2 1608
情歌与酒
情歌与酒 2021-01-02 10:56

I\'m trying to run a Hello World program but am getting the error

./ex1.c: line 3: syntax error near unexpected token `(`
./ex1.c: line 3: `int main (int arg         


        
2条回答
  •  余生分开走
    2021-01-02 11:47

    After you compile the program by using make "your program name" (like make mario in this case), then just use ./"your program name" (this case ./mario). DO NOT add .c when running the program.

提交回复
热议问题