The overflow exception while using stoi() function in cpp. Please explain the case for the example I am adding:
string s = “112233445566”;
int i = stoi(s,0,10);
The exception occurs for the integer ‘i’ upon conversion using stoi() however, not for the string ‘s’. The out_of_range error is being issued for only ‘i’ and not for ‘s’. Why? Please elaborate upon this.