Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

string to int c++

// Convert 2 character substring from position 0 to an integer
int num = std::stoi(s.substr(0, 2));
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #string #int
ADD COMMENT
Topic
Name
7+1 =