Message from C, C++ talks
It throws the following error with input as "123":
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 18446744073709551615) >= this->size() (which is 3)
Aborted (core dumped)
Can anyone spot any kind of mistake?