代码之家  ›  专栏  ›  技术社区  ›  Vicente Coves Beneyto

当我收到此消息[已关闭]时,如何检测我的编码错误

  •  -9
  • Vicente Coves Beneyto  · 技术社区  · 9 年前

    代码链接: http://gyazo.com/f0f4004eb606607ecaa021b5e22e6e06 我在运行代码时遇到以下错误。

    "error: expected identifieror '(' "
    

    我用gedit编写这段代码。 我会感谢一些支持人员;)

    提前感谢!, 维森特

    2 回复  |  直到 9 年前
        1
  •  1
  •   jxexk    9 年前

    int main(void); 公告

    尝试将第4行替换为: int main(void) 相反

    另外,请仔细阅读C函数声明语法 https://msdn.microsoft.com/en-us/library/c4d5ssht.aspx .

        2
  •  1
  •   ameyCU    9 年前
     int main(void);
                   ^you should not do this.
    

    你忘了放 ; 在此声明之后-

    int height=n
    

    此外 n 未在程序中声明。