Hey guys , i haing a problem with using stringstream and atoi . I am trying to conert a string to in integer
When using stringstream
string d = "033116"; int b = 0; stringstream ss (d); ss >> b ;
When using atoi
string d = "033116"; int b = 0; b = atoi(d.c_str();
For some reason , when i cout my result out , the result displayed will be "33116". For some reason , it will not read "0" as in integer. Is there any way i can fix this issue. Thanks!