更新时间:2023-12-03 18:11:22
" 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>
#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