|
|
back to boardconverting from string to int Posted by Ahmad 8 Dec 2011 04:32 hi I am facing problem in converting. I try this: string lock1; int x; cin>>lock1; x= atoi(lock1.c_str()); it works but when I submit it it gives me compilation error, so any ideas or other way to convert from string to integer??? thank you. Re: converting from string to int Posted by Ahmad 8 Dec 2011 05:02 no thing wrong with my code the only thing missing that I did not include<cstring> and <string> and it's works now :) |
|
|