Super Easy Solution Using Stringstream in C++


#1

int Solution::atoi(const string A)
{
stringstream ss;
ss<<A;
int x;
ss>>x;
return x;
}