Having loved the ability to compile VS2010 projects inside the VS2012 shell as a way of delaying the update, I thought it was time to stop delaying ( 1 Year late ).
std::cout << "Minimum value for int: " << std::numeric_limits<int>::min() << std::endl;
std::cout << "Maximum value for int: " << std::numeric_limits<int>::max() << std::endl;
error C2059: syntax error : '::' [path]\source.cpp
There is a good chance if you have these lines and are including the windows header you will hit an error. The Windows team put in a solution to the #define min conflict in <minwindef.h>.
So instead of
You use a #define to avoid this
Another issue I found was with an annoying char define, again from the Windows team in <rpcndr.h>.
#define small char
This one doesn’t have the ability to comment out for so if you have a small function with something like:
AnObj small = large.resize(val);
error C2628:'AnObj' followed by 'char' is illegal (did you forget a ';'?) [path]\source.cpp
You will have to suffer and change the name, in some ways it teaches you (me) for not being very specific, still annoying though. Hopefully this is all the conversion errors I’ll hit.