Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


#ActualEddieV223

Posted 14 March 2013 - 07:41 PM

if you don't have c++11, no problem, you can use the atoi function.

 

It takes a c string as parameter returns an int, if you have a std::string just do

 

int myInt = atoi( myString.c_str() );

 

http://en.cppreference.com/w/cpp/string/byte/atoi


#1EddieV223

Posted 14 March 2013 - 07:33 PM

if you don't have c++11, no problem, you can use the atoi function.

 

It takes a c string as parameter returns an int, if you have a std::string just do

 

int myInt = atoi( myString.c_str() );


PARTNERS