+ 1

string to int

How can I turn an string variable into int?

8th Dec 2019, 1:49 PM
Zohal
Zohal - avatar
1 Answer
+ 5
Assuming you're using a std::string : std::string str("123"); auto i = std::stoi(str);
8th Dec 2019, 2:15 PM
Théophile
Théophile - avatar