0

How to code a program which can convert a string to an integer in C++?

eg: input a string: "1234" output an int: 1234 p/s: the string has to be inputted by the user. Thank you!!!

15th Jun 2017, 11:17 PM
School Dog
2 Respostas
+ 4
https://code.sololearn.com/cSSK2DC4OqFj/?ref=app this does both.(int to string, string to int) it should contain what you need
15th Jun 2017, 11:21 PM
jay
jay - avatar
+ 3
try to use this function stringstream name(variable);
15th Jun 2017, 11:23 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar