Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ string to int

// EXAMPLE
std::string sStringAsString = "789";
int iStringAsInt = atoi( sStringAsString.c_str() );

/* SYNTAX
atoi( <your-string>.c_str() )
*/

/* HEADERS
#include <cstring>
#include <string>
*/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #int
ADD COMMENT
Topic
Name
8+7 =