Syntax error near unexpected token '('

前端 未结 3 1596
你的背包
你的背包 2021-01-16 20:03

As a beginner, I am trying to write a simple c program to learn and execute the \"write\" function.

I am trying to execute a simple c program simple_write.c

3条回答
  •  一个人的身影
    2021-01-16 20:35

    You cannot execute C source code in Linux (or other systems) directly.

    C is a language that requires compilation to binary format.

    You need to install C compiler (the actual procedure differs depending on your system), compile your program and only then you can execute it.

    Currently it was interpreted by shell. The first two lines starting with # were ignored as comments. The third line caused a syntax error.

提交回复
热议问题