c++ - Converting char to int '23' > 23 -


i have seen many post of how convert single digit int, how can convert more 1 digit number int, '23' convert 23;

to convert char array integer, use atoi(). if converting strings, add .c_str() after string variable convert suitable form use.

you can use stoi(), provides additional features conversion, such specifying base.


Comments

Popular posts from this blog

angularjs - Showing an empty as first option in select tag -

python - argument 2 to map() must support iteration -

javafx - How to wait cancellation of task after Service#cancel? -