+ 1
Is there a way to convert strings to int and vice versa in C++? I've tried the stoi and atoi method but I get compilation error
C++ Programming
2 Antworten
+ 1
int n = 54321;
string s = to_string(n);
string s = "54321";
int n = stoi(s);
0
https://code.sololearn.com/c8Lh2yL2f3So/?ref=app
Hope this helps