在'='标记之前解析错误 [英] parse error before '=' token

查看:96
本文介绍了在'='标记之前解析错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#include< stdio.h>

#define BALANCE 5000

int main(){

int balance = BALANCE;


返回0;

}


当我编译它时,发生错误,是什么'发生了吗?

ass3ext.c:9:错误:'=''之前解析错误令牌


谢谢!

解决方案



" nick" < I1 ******** @ yahoo.com>在消息中写道

news:di *********** @ justice.itsc.cuhk.edu.hk ...

#include< stdio.h>
#define BALANCE 5000
int main(){
int balance = BALANCE;

返回0;
}

当我编译它时,会发生错误,发生了什么?
ass3ext.c:9:错误:在''=''令牌之前解析错误




发布给出错误的真实代码。

你发布的内容应该编译得很好。


- Mike




nick写道:

#include< stdio.h>
#define BALANCE 5000

int main(){
int balance = BALANCE;

返回0;
}
我编译的时候它发生了什么错误,发生了什么?
ass3ext.c:9:错误:在''=''令牌之前解析错误

谢谢!



此代码在gcc 3.4.2上正确编译。请再次验证

让我们知道确切的错误。


#include< stdio.h> < br $>
#define BALANCE 5000

int main()

{

int balnace = BALNACE;


返回0;

}


代码没有任何问题


#include <stdio.h>
#define BALANCE 5000

int main(){
int balance = BALANCE;

return 0;
}

when i compile it, an error occurs,what''s happen?
ass3ext.c:9: error: parse error before ''='' token

thanks!

解决方案


"nick" <i1********@yahoo.com> wrote in message
news:di***********@justice.itsc.cuhk.edu.hk...

#include <stdio.h>
#define BALANCE 5000

int main(){
int balance = BALANCE;

return 0;
}

when i compile it, an error occurs,what''s happen?
ass3ext.c:9: error: parse error before ''='' token



Post the real code giving the error.
What you''ve posted should compile just fine.

-Mike



nick wrote:

#include <stdio.h>
#define BALANCE 5000

int main(){
int balance = BALANCE;

return 0;
}

when i compile it, an error occurs,what''s happen?
ass3ext.c:9: error: parse error before ''='' token

thanks!



This code compiles properly on gcc 3.4.2. Please verify once again and
let us know what is the exact error.


#include <stdio.h>
#define BALANCE 5000

int main()
{
int balnace = BALNACE;

return 0;
}

the code have not any problem


这篇关于在'='标记之前解析错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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