This code compiles and works fine with Dev C++, but MSVC.NET is giving me errors:
Code:
#include <iostream>
...
using namespace std;
...
cin.ignore(numeric_limits<streamsize>::max(),'\n');
MSVC reports:
Code:
c:\SwitchConf\selectSwitch.cpp(30): error C2059: syntax error : '::'
c:\SwitchConf\selectSwitch.cpp(30): error C2065: 'numeric_limits' : undeclared identifier
c:\SwitchConf\selectSwitch.cpp(30): error C2275: 'std::streamsize' : illegal use of this type as an expression
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\iosfwd(22) : see declaration of 'std::streamsize'
c:\SwitchConf\selectSwitch.cpp(30): error C2589: '(' : illegal token on right side of '::'
c:\SwitchConf\selectSwitch.cpp(30): warning C4003: not enough actual parameters for macro 'max'
Googling for numeric_limits<streamsize> turned up nothing about MSVC. What's the deal?