String | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

String

as I knew about it on Qbasic of Bill Gates we could easily transform strings into int and int into strings. but on c++ I think it is a little bit different. could someone just tell about ways of transforming.

16th Apr 2018, 4:30 PM
Amidkhon
Amidkhon - avatar
3 Answers
+ 2
String to Integer: Use stoi() int num = stoi("46"); Integer to String: Use to_string() string str = to_string(46);
16th Apr 2018, 5:58 PM
777
777 - avatar
0
does it really works
17th Apr 2018, 3:57 PM
Amidkhon
Amidkhon - avatar
0
That's great
17th Apr 2018, 3:58 PM
Amidkhon
Amidkhon - avatar