ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1877. Bicycle Codes

converting 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 :)