Is this a bug of VC2005?
-
int nmaxint = std::numeric_limits::max();
this line generates two compile errors when I built in vs2005 sp1. error C2589: '(' : illegal token on right side of '::' error C2059: syntax error : '::' I don't think there are something wrong in this line. PLZ help :)
A Chinese VC++ programmer
-
int nmaxint = std::numeric_limits::max();
this line generates two compile errors when I built in vs2005 sp1. error C2589: '(' : illegal token on right side of '::' error C2059: syntax error : '::' I don't think there are something wrong in this line. PLZ help :)
A Chinese VC++ programmer
sorry, I mean std::numeric_limits::max(); the "" part was ripped. A Chinese VC++ programmer
-
int nmaxint = std::numeric_limits::max();
this line generates two compile errors when I built in vs2005 sp1. error C2589: '(' : illegal token on right side of '::' error C2059: syntax error : '::' I don't think there are something wrong in this line. PLZ help :)
A Chinese VC++ programmer
-
I think this error is coming because of the max() macro. Try one thing. Just above the include of limit.h, put
#undef max
Naveen wrote:
#undef max
Maybe you are right! When I choose the "Go To Definition" menu item in the context menu, the ide open "windef.h", not STL's limit. It does work when I undef max. :laugh:
A Chinese VC++ programmer
-
Naveen wrote:
#undef max
Maybe you are right! When I choose the "Go To Definition" menu item in the context menu, the ide open "windef.h", not STL's limit. It does work when I undef max. :laugh:
A Chinese VC++ programmer
zengkun100 wrote:
When I choose the "Go To Definition" menu item in the context menu, the ide open "windef.h", not STL's limit.
zengkun100 wrote:
It does work when I undef max.
zengkun100 wrote:
Maybe you are right!
How many evidences do you need? :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
zengkun100 wrote:
When I choose the "Go To Definition" menu item in the context menu, the ide open "windef.h", not STL's limit.
zengkun100 wrote:
It does work when I undef max.
zengkun100 wrote:
Maybe you are right!
How many evidences do you need? :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Thank you! :-D
A Chinese VC++ programmer