adspace


What is stoi in c++?

Answer Posted / Hemant Kumar

stoi stands for string-to-integer conversion function. It's part of the C++ Standard Library (<string> header). Here's an example:n```cppn#include <iostream>n#include <string>nnint main() {n std::string str = "42";n int num = std::stoi(str);n std::cout << num << 'n';n return 0;n}n```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1164


Can union be self referenced?

1266


What character terminates all character array strings a) b) . c) END

1394


daily Routine of father

1484


What is the latest version on c++?

1206