【问题标题】:Keep getting this compiling error [closed]不断收到此编译错误[关闭]
【发布时间】:2014-02-20 17:02:55
【问题描述】:

当我编译时,我不断收到这个错误。

mario.c:4:1: error: expected identifier or '('

我尝试过改变一些东西,然后修复它们,改变其他东西,然后修复它们,但似乎没有任何帮助。我是新来的。有人可以帮忙吗?

#include <stdio.h>
#include <cs50.h>
int main(void);
{
int n;

    do 
   { 
    n = GetInt();
   }
    while (n=<0);
}

【问题讨论】:

    标签: c cs50


    【解决方案1】:

    改变

    int main(void);  
                  ^Remove the semicolon 
    

    int main(void)  
    

    也要改变

    while (n=<0);  
    

    while (n <= 0);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-03-19
      • 1970-01-01
      • 2012-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-27
      • 1970-01-01
      相关资源
      最近更新 更多