I`ve tried many ways to convent a string to a int. This includes atoi() and stringstream
But i still cannot convert it. I have a only numeric string and i want to convert it to a int.
The reason for that is that im receiving data form user using getch() and storing it into a string buffer, but in a certain point i want to convert this buffer to a int for use. So my string would be like that:
string hello = "673";
And i want to transform this value into an interger. EDIT This is not a duplicated questions because i tried all this methods many times and still now work.All of this just crash my program or error an invalid conversion.