#include #include #include #include using namespace std; int main(){ vector V = {2247483647, 10000000000, 120000, 50, -300000, 10000000000, 120, 50, 10000000000}; // If we uncomment the following line the program won't compile complaining that A is too large //int A[9223372036854775807]; //Counting number of times each item appears in V unordered_map counts; for (int i=0; i::iterator itr=counts.begin(); itr!=counts.end(); itr++) cout << itr->first << ":" << itr->second << endl; // showing the limits of int and long cout << "limits of int: [" << std::numeric_limits::min() << ", " << std::numeric_limits::max() << "]" << endl; cout << "limits of long: [" << std::numeric_limits::min() << ", " << std::numeric_limits::max() << "]" << endl; }