All the test case passes but output my marks is 0 in the quetsion

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;

}

Have you unlocked any test cases or editorial for it, ? If not, then pls refresh and then try to submit again…

i have refresh many time but all the test cases passes but i do not get the number.