J
John
Hi,
I am working on a legacy code. Following is a line of the code which
complies with Visual C++.NET 2003 but not with Visual C++ 2005:
for ( int i = 0; i < (const)(X.size()); i++ ) {}// X is an object such as a
standard Vector
Compile error with Visual C++ 2005:
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
Compiler expect (const int) not (const). My question is why do we need
(const) in the for loop? I am not sure of its purpose. Any explanation of
the problem and possible solutions?
Thanks for your help.
John
I am working on a legacy code. Following is a line of the code which
complies with Visual C++.NET 2003 but not with Visual C++ 2005:
for ( int i = 0; i < (const)(X.size()); i++ ) {}// X is an object such as a
standard Vector
Compile error with Visual C++ 2005:
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
Compiler expect (const int) not (const). My question is why do we need
(const) in the for loop? I am not sure of its purpose. Any explanation of
the problem and possible solutions?
Thanks for your help.
John