String to Integer conversion

https://hack.codingblocks.com/contests/c/587/332

hey pratik, what do you want us to do ??.. clarify your doubt.
this question gives you a string “1234” and you have to convert it into integer and then print it.
string “1234” means one two three four
integer 1234 means one thousand two hundered thirty four.

I wrote the code but it is showing incorrect.
The code : https://ide.codingblocks.com/s/46075

Hey Pratik, in your return statement return (s2 + 10*stringtoint(s2[i]));, you are trying to add a string s2 with an integer 10*stringtoint(s2[i]), and this is not valid in c++. you can add two same data types only.

Thank you for the help.