stoi function
#include <iostream>
int main()
{
std::string octalString = "50";
int decimalNumber = stoi(octalString, nullptr, 8);
std::cout << decimalNumber << std::endl;
return 0;
}
#include <iostream>
int main()
{
std::string octalString = "50";
int decimalNumber = stoi(octalString, nullptr, 8);
std::cout << decimalNumber << std::endl;
return 0;
}
Leave a Comment
Cancel reply