请收到此错误编译 [英] Keep getting this compiling error

查看:116
本文介绍了请收到此错误编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译,我不断收到此错误。

  mario.c:4:1:错误:预期的标识符或'('

我试图改变的东西,然后固定,并改变其他的东西,然后解决了那些但似乎没有任何帮助。我是新这里。谁能帮助?

 的#include<&stdio.h中GT;
#包括LT&;&cs50.h GT;
INT主要(无效);
{
INT N;    做
   {
    N =调用getInt();
   }
    而(N =℃,);
}


解决方案

修改

  INT主要(无效);
              ^移除分号

  INT主要(无效)

,改变

 而(N =小于0);

 而(N< = 0);

When I compile, I keep getting this error.

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

I've tried changing things and then fixing them and changing other things and then fixing those but nothing seems to help. I'm new at this. Can anyone help?

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

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

解决方案

Change

int main(void);  
              ^Remove the semicolon 

to

int main(void)  

and also change

while (n=<0);  

to

while (n <= 0);

这篇关于请收到此错误编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆