kiran
2015-11-04 12:56:28 UTC
I have been using stoi to convert string representation of numbers into int
since long. Only recently one such program of mine stopped working giving
following error:
string_int.cpp: In function 'int main(int, char**)':
string_int.cpp:29: error: 'stoi' is not a member of 'std'
Here is the code snippet:
std::string newValStr = "777;
int newValInt = 0;
newValInt = std::stoi(newValStr);
I looked around internet and there doesn't seem to be any update on it. I am
compiling it using g++ on Redhat Linux 6.2 with following gcc version:
gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
Has anyone else also faced something similar?
thanks
KR
since long. Only recently one such program of mine stopped working giving
following error:
string_int.cpp: In function 'int main(int, char**)':
string_int.cpp:29: error: 'stoi' is not a member of 'std'
Here is the code snippet:
std::string newValStr = "777;
int newValInt = 0;
newValInt = std::stoi(newValStr);
I looked around internet and there doesn't seem to be any update on it. I am
compiling it using g++ on Redhat Linux 6.2 with following gcc version:
gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
Has anyone else also faced something similar?
thanks
KR
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]