Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
????string str;
????cin >> str;
????int i;
????int m,b;
????while(str!="-"){
????????cin >> m;
????????for(i=0;i<m;i++){
????????????cin >> b;
????????????str=str.substr(b,str.size()-b)+str.substr(0,b);
????????}
????????cout << str << endl;
????????cin >> str;
????}
??????return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: expected primary-expression before '?' token
    5 | ????string str;
      | ^
a.cc:5:2: error: expected primary-expression before '?' token
    5 | ????string str;
      |  ^
a.cc:5:3: error: expected primary-expression before '?' token
    5 | ????string str;
      |   ^
a.cc:5:4: error: expected primary-expression before '?' token
    5 | ????string str;
      |    ^
a.cc:5:12: error: expected primary-expression before 'str'
    5 | ????string str;
      |            ^~~
a.cc:5:11: error: expected ':' before 'str'
    5 | ????string str;
      |           ^~~~
      |           :
a.cc:5:12: error: 'str' was not declared in this scope; did you mean 'std'?
    5 | ????string str;
      |            ^~~
      |            std
a.cc:5:15: error: expected ':' before ';' token
    5 | ????string str;
      |               ^
      |               :
a.cc:5:15: error: expected primary-expression before ';' token
a.cc:5:15: error: expected ':' before ';' token
    5 | ????string str;
      |               ^
      |               :
a.cc:5:15: error: expected primary-expression before ';' token
a.cc:5:15: error: expected ':' before ';' token
    5 | ????string str;
      |               ^
      |               :
a.cc:5:15: error: expected primary-expression before ';' token
a.cc:6:1: error: expected primary-expression before '?' token
    6 | ????cin >> str;
      | ^
a.cc:6:2: error: expected primary-expression before '?' token
    6 | ????cin >> str;
      |  ^
a.cc:6:3: error: expected primary-expression before '?' token
    6 | ????cin >> str;
      |   ^
a.cc:6:4: error: expected primary-expression before '?' token
    6 | ????cin >> str;
      |    ^
a.cc:6:15: error: expected ':' before ';' token
    6 | ????cin >> str;
      |               ^
      |               :
a.cc:6:15: error: expected primary-expression before ';' token
a.cc:6:15: error: expected ':' before ';' token
    6 | ????cin >> str;
      |               ^
      |               :
a.cc:6:15: error: expected primary-expression before ';' token
a.cc:6:15: error: expected ':' before ';' token
    6 | ????cin >> str;
      |               ^
      |               :
a.cc:6:15: error: expected primary-expression before ';' token
a.cc:6:15: error: expected ':' before ';' token
    6 | ????cin >> str;
      |               ^
      |               :
a.cc:6:15: error: expected primary-expression before ';' token
a.cc:7:1: error: expected primary-expression before '?' token
    7 | ????int i;
      | ^
a.cc:7:2: error: expected primary-expression before '?' token
    7 | ????int i;
      |  ^
a.cc:7:3: error: expected primary-expression before '?' token
    7 | ????int i;
      |   ^
a.cc:7:4: error: expected primary-expression before '?' token
    7 | ????int i;
      |    ^
a.cc:7:5: error: expected primary-expression before 'int'
    7 | ????int i;
      |     ^~~
a.cc:7:5: error: expected ':' before 'int'
    7 | ????int i;
      |     ^~~
      |     :
a.cc:7:5: error: expected primary-expression before 'int'
    7 | ????int i;
      |     ^~~
a.cc:7:5: error: expected ':' before 'int'
    7 | ????int i;
      |     ^~~
      |     :
a.cc:7:5: error: expected primary-expression before 'int'
    7 | ????int i;
      |     ^~~
a.cc:7:5: error: expected ':' before 'int'
    7 | ????int i;
      |     ^~~
      |     :
a.cc:7:5: error: expected primary-expression before 'int'
    7 | ????int i;
      |     ^~~
a.cc:7:5: error: expected ':' before 'int'
    7 | ????int i;
      |     ^~~
      |     :
a.cc:7:5: error: expected primary-expression before 'int'
    7 | ????int i;
      |     ^~~
a.cc:8:1: error: expected primary-expression before '?' token
    8 | ????int m,b;
      | ^
a.cc:8:2: error: expected primary-expression before '?' token
    8 | ????int m,b;
      |  ^
a.cc:8:3: error: expected primary-expression before '?' token
    8 | ????int m,b;
      |   ^
a.cc:8:4: error: expected primary-expression before '?' token
    8 | ????int m,b;
      |    ^
a.cc:8:5: error: expected primary-expression before 'int'
    8 | ????int m,b;
      |     ^~~
a.cc:8:5: error: expected ':' before 'int'
    8 | ????int m,b;
      |     ^~~
      |     :
a.cc:8:5: error: expected primary-expression before 'int'
    8 | ????int m,b;
      |     ^~~
a.cc:8:5: error: expected ':' before 'int'
    8 | ????int m,b;
      |     ^~~
      |     :
a.cc:8:5: error: expected primary-expression before 'int'
    8 | ????int m,b;
      |     ^~~
a.cc:8:5: error: expected ':' before 'int'
    8 | ????int m,b;
      |     ^~~
      |     :
a.cc:8:5: error: expected primary-expression before 'int'
    8 | ????int m,b;
      |     ^~~
a.cc:8:5: error: expected ':' before 'int'
    8 | ????int m,b;
      |     ^~~
      |     :
a.cc:8:5: error: expected primary-expression before 'int'
    8 | ????int m,b;
      |     ^~~
a.cc:9:1: error: expected primary-expression before '?' token
    9 | ????while(str!="-"){
      | ^
a.cc:9:2: error: expected primary-expression before '?' token
    9 | ????while(str!="-"){
      |  ^
a.cc:9:3: error: expected primary-expression before '?' token
    9 | ????while(str!="-"){
      |   ^
a.cc:9:4: error: expected primary-expression before '?' token
    9 | ????while(str!="-"){
      |    ^
a.cc:9:5: error: expected primary-expression before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
a.cc:9:5: error: expected ':' before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
      |     :
a.cc:9:5: error: expected primary-expression before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
a.cc:9:5: error: expected ':' before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
      |     :
a.cc:9:5: error: expected primary-expression before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
a.cc:9:5: error: expected ':' before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
      |     :
a.cc:9:5: error: expected primary-expression before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
a.cc:9:5: error: expected ':' before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
      |     :
a.cc:9:5: error: expected primary-expression before 'while'
    9 | ????while(str!="-"){
      |     ^~~~~
a.cc:18:1: error: expected primary-expression before '?' token
   18 | ??????return 0;
      | ^
a.cc:18:2: error: expected primary-expression before '?' token
   18 | ??????return 0;
      |  ^
a.cc:18:3: error: expected primary-expression before '?' token
   18 | ??????return 0;
      |   ^
a.cc:18:4: error: expected primary-expression before '?' token
   18 | ??????return 0;
      |    ^
a.cc:18:5: error: expected primary-expression before '?' token
   18 | ??????return 0;
      |     ^
a.cc:18:6: error: expected primary-expression before '?' token
   18 | ??????return 0;
      |      ^
a.cc:18:7: error: expected primary-expression before 'return'
   18 | ??????return 0;
      |       ^~~~~~
a.cc:18:7: error: expected ':' before 'return'
   18 | ??????return 0;
      |       ^~~~~~
      |       :
a.cc:18:7: error: expected primary-expression before 'return'
   18 | ??????return 0;
      |       ^~~~~~
a.cc:18:7: error: expected ':' before 'return'
   18 | ??????return 0;
      |       ^~~~~~
      |       :
a.cc:18:7: error: expected primary-expression before 'return'
   18 | ??????return 0;
      |       ^~~~~~
a.cc:18:7: error: expected ':' before 'return'
   18 | ??????return 0;
      |       ^~~~~~
      |       :
a.cc:18:7: error: expected primary-expression before 'return'
   18 | ??????return 0;
      |       ^~~~~~
a.cc:18:7: error: expected ':' before 'return'
   18 | ??????return 0;
      |       ^~~~~~
      |       :
a.cc:18:7: error: expected primary-expression before 'return'
   18 | ??????return 0;
      |       ^~~~~~
a.cc:18:7: error: expected ':' before 'return'
   18 | ??????return 0;
      |       ^~~~~~
      |       :
a.cc:18:7: error: expected primary-expression before 'return'
   18 | ??????return 0;
      |       ^~~~~~
a.cc:18:7: error: expected ':' before 'return'
   18 | ??????return 0;
      |       ^~~~~~
      |       :
a.cc:18:7: error: expected primary-expression before 'return'
   18 | ??????return 0;
      |       ^~~~~~