由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Question about a C++ compilation error on Visual Studio 2005
相关主题
What is wrong in this array declaration.请教:函数后面的 throw() 有意义么?
在 windows下的C++开发平台是不是 Dev-C++?a C++ question
Smart Parser/Compiler DevelopmentPython的script的兼容问题
[合集] 编程的习惯问题spent a lot of time try to compile boost
C arrayfatal error C1001: INTERNAL COMPILER ERROR
A C++ compiler related interview questionvisual studio 支持 C吗?
最初级的白痴C++问题一个qt3在Windows上的问题
Anyone use visual studio 2005 under vista[合集] VisualC++的compiler是不是也不是free的? (转载)
相关话题的讨论汇总
话题: error话题: int话题: syntax话题: c2143话题: long
进入Programming版参与讨论
1 (共1页)
y****e
发帖数: 23939
1
This line of code:
static int k_means_cont_table_(int * grp1, int * grp2, int * stb, long s1,
long s2, int flag);
always report error:
error C2143: syntax error : missing ')' before 'constant'
error C2143: syntax error : missing ';' before 'constant'
error C2059: syntax error : ')'
error C2238: unexpected token(s) preceding ';'
If I comment out this line and the corresponding code in cpp, then it
compiles OK. I checked it again and again, it looks innocent. What could be
the reason for this erro
t****t
发帖数: 6806
2
把前后三行贴出来看

be

【在 y****e 的大作中提到】
: This line of code:
: static int k_means_cont_table_(int * grp1, int * grp2, int * stb, long s1,
: long s2, int flag);
: always report error:
: error C2143: syntax error : missing ')' before 'constant'
: error C2143: syntax error : missing ';' before 'constant'
: error C2059: syntax error : ')'
: error C2238: unexpected token(s) preceding ';'
: If I comment out this line and the corresponding code in cpp, then it
: compiles OK. I checked it again and again, it looks innocent. What could be

y****e
发帖数: 23939
3
// k-means helper
static Dict min_dist_real(EMData* image, const vector& data);
static Dict min_dist_four(EMData* image, const vector& data);
static int k_means_cont_table_(int* grp1, int* grp2, int* stb, long int s1,
long int s2, int flag);
// new code common-lines
static vector cml_weights(const vector& cml);

【在 t****t 的大作中提到】
: 把前后三行贴出来看
:
: be

t****t
发帖数: 6806
4
error C2143: syntax error : missing ')' before 'constant'
error C2143: syntax error : missing ';' before 'constant'
error C2059: syntax error : ')'
error C2238: unexpected token(s) preceding ';'
I don't see symbol "constant" anywhere. which line is the error message
refering to?

s1,

【在 y****e 的大作中提到】
: // k-means helper
: static Dict min_dist_real(EMData* image, const vector& data);
: static Dict min_dist_four(EMData* image, const vector& data);
: static int k_means_cont_table_(int* grp1, int* grp2, int* stb, long int s1,
: long int s2, int flag);
: // new code common-lines
: static vector cml_weights(const vector& cml);

y****e
发帖数: 23939
5
Exact this line in my original post:
static int k_means_cont_table_(int * grp1, int * grp2, int * stb, long s1,
long s2, int flag);
That's what puzzled me. I comment out this function, then nothing wrong.

【在 t****t 的大作中提到】
: error C2143: syntax error : missing ')' before 'constant'
: error C2143: syntax error : missing ';' before 'constant'
: error C2059: syntax error : ')'
: error C2238: unexpected token(s) preceding ';'
: I don't see symbol "constant" anywhere. which line is the error message
: refering to?
:
: s1,

t****t
发帖数: 6806
6
1. type that line again. don't copy/paste.
2. do you think you could have some macro intruding this line?
try use cpp to see what the compiler really saw.

【在 y****e 的大作中提到】
: Exact this line in my original post:
: static int k_means_cont_table_(int * grp1, int * grp2, int * stb, long s1,
: long s2, int flag);
: That's what puzzled me. I comment out this function, then nothing wrong.

y****e
发帖数: 23939
7
I have tried 1.
I also doubted macro, tried to change function name and variable name.
What do you mean "use cpp to see what the compiler really saw". Howcan I
do it?
Thank you very much.

【在 t****t 的大作中提到】
: 1. type that line again. don't copy/paste.
: 2. do you think you could have some macro intruding this line?
: try use cpp to see what the compiler really saw.

t****t
发帖数: 6806
8
try to use cl.exe /E to compile.

【在 y****e 的大作中提到】
: I have tried 1.
: I also doubted macro, tried to change function name and variable name.
: What do you mean "use cpp to see what the compiler really saw". Howcan I
: do it?
: Thank you very much.

c*******u
发帖数: 1269
9
put following into one line
static int k_means_cont_table_(int* grp1, int* grp2, int* stb, long int s1,
long int s2, int flag);
P********e
发帖数: 2610
10
does this matter?
most our codes do things like this.

put following into one line
static int k_means_cont_table_(int* grp1, int* grp2, int* stb, long int s1,
long int s2, int flag);

【在 c*******u 的大作中提到】
: put following into one line
: static int k_means_cont_table_(int* grp1, int* grp2, int* stb, long int s1,
: long int s2, int flag);

1 (共1页)
进入Programming版参与讨论
相关主题
[合集] VisualC++的compiler是不是也不是free的? (转载)C array
什么地方有 free windows 的 C compiler downloadA C++ compiler related interview question
help!无法编译一个package最初级的白痴C++问题
Visual C++ Express 很土的问题求救Anyone use visual studio 2005 under vista
What is wrong in this array declaration.请教:函数后面的 throw() 有意义么?
在 windows下的C++开发平台是不是 Dev-C++?a C++ question
Smart Parser/Compiler DevelopmentPython的script的兼容问题
[合集] 编程的习惯问题spent a lot of time try to compile boost
相关话题的讨论汇总
话题: error话题: int话题: syntax话题: c2143话题: long