The easiest way to remember is to look at std::numeric_limits< int >::max()
For example (from MSDN),
// numeric_limits_max.cpp
#include
#include
using namespace std;
int main() {
cout << "The maximum value for type float is: "
<< numeric_limits::max( )
<< endl;
cout << "The maximum value for type double is: "
<< numeric_limits::max( )
<< endl;
cout << "The maximum value for type int is: "
<< numeric_limits::max( )
<< endl;
cout << "The maximum value for type short int is: "
<< numeric_limits::max( )
<< endl;
}