the code for thsi problem(Recursion-Convert String to Integer):-
#include
using namespace std;
int StrToInt(string str,int i){
//base case
if(i == str.length()){
return (i-‘0’);
}
//recursive case
int mynumber = StrToInt(str,i+1)-'0';
return mynumber;
}
int main() {
string str;
cin>>str;
cout<<string(str,0);
return 0;
}