c 2b 2b string to integer without stoi

Solutions on MaxInterview for c 2b 2b string to integer without stoi by the best coders in the world

showing results for - "c 2b 2b string to integer without stoi"
Meadow
27 Jul 2017
1#include <iostream>
2#include <sstream>
3
4using namespace std;
5
6int main() 
7{
8    string s = "999";
9
10    stringstream degree(s);
11
12    int x = 0;
13    degree >> x;
14
15    cout << "Value of x: " << x;
16}