to keep the console window open, as suggested on this site.
But the moment I remove the comment on the <WinSock2.h> header file, such as on this very simple program below,
1 2 3 4 5 6 7 8 9 10 11
#include <iostream>
#include <limits>
//#include <WinSock2.h>
int main( int argc, char* argv[ ])
{
std::cout << "Press <enter> to exit...";
std::cin.ignore( std::numeric_limits< std::streamsize >::max(), 'n' );
return 0;
}
Visual Studio 2010 instantly underlines ::max() and says it expects an identifier, preventing compilation.
So something in WinSock2 is altering something that is defined in Limits?
What is a work-around?
Thank you.