+ 2
Need to fix line 16
2 odpowiedzi
+ 1
for(int i=0; i<l; i++){
if(isdigit(str[i])){
string s;
s+=str[i];
cout<<arr[stoi(s)];
continue;
}
cout<<str[i];
}
//string argument needed so convert to string..
//hope it helps...
+ 4
// or this code
string s;
for(int i=0; i<l; i++) if(isdigit(str[i])) s+=arr[stoi(&str[i])]; else s+=str[i];
cout<<s;