Answers for "c++ string to integer without stoi"

C++
1

c++ string to integer without stoi

#include <iostream>
#include <sstream>

using namespace std;

int main() 
{
    string s = "999";

    stringstream degree(s);

    int x = 0;
    degree >> x;

    cout << "Value of x: " << x;
}
Posted by: Guest on June-16-2020

Browse Popular Code Answers by Language