‘numeric_limits’ was not declared in this scope, no matching function for call to ‘max()’
问题 I compiled this code at home on my mac w/ xcode and there was no provblem. I compile it at school with g++ on linux and I get these errors: :‘numeric_limits’ is not a member of std :expected primary-expression before ‘>’ token :no matching function for call to ‘max()’ #include <iostream> #include <cstdlib> using namespace std; int GetIntegerInput(int lower, int upper) { int integer = -1; do { cin >> integer; cin.clear(); cin.ignore(std::numeric_limits<streamsize>::max(), '\n'); //errors here