Main.cc: In function ‘int main()’:
Main.cc:7:9: error: conflicting declaration ‘std::__cxx11::string t’
string t;
^
Main.cc:5:14: note: previous declaration as ‘int t’
int n,k,r,s,t;
^
Main.cc:16:15: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
else if(a[i]='r') sum+=c;
~~~~^~~~
Main.cc:16:21: error: ‘sum’ was not declared in this scope
else if(a[i]='r') sum+=c;
^~~
Main.cc:16:26: error: ‘c’ was not declared in this scope
else if(a[i]='r') sum+=c;
^
Main.cc:17:22: error: ‘sum’ was not declared in this scope
else if(a[i]=='s') sum+=r;
^~~
Main.cc:18:21: error: ‘sum’ was not declared in this scope
else if(a[i]=='c')sum+=s;
^~~
Main.cc:20:8: error: ‘sum’ was not declared in this scope
cout<