criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
int main() {
    char mess[200],en[200];
    int m,h;
    scanf("%s %d",mess ,m);
    for(int i=0; i<m; i++){
        cin>>h;
        en[200]=mess.substr(0,h);
        mess.erase(0,h);
        mess.insert(mess.end,en);
    }
    printf("%s\n",mess);
    return 0;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:12:22: error: request for member 'substr' in 'mess', which is of non-class type 'char [200]'
   12 |         en[200]=mess.substr(0,h);
      |                      ^~~~~~
a.cc:13:14: error: request for member 'erase' in 'mess', which is of non-class type 'char [200]'
   13 |         mess.erase(0,h);
      |              ^~~~~
a.cc:14:14: error: request for member 'insert' in 'mess', which is of non-class type 'char [200]'
   14 |         mess.insert(mess.end,en);
      |              ^~~~~~
a.cc:14:26: error: request for member 'end' in 'mess', which is of non-class type 'char [200]'
   14 |         mess.insert(mess.end,en);
      |                          ^~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
int main() {
    char mess[200],en[200];
    int m,h;
    scanf("%s %d",mess ,m);
    for(int i=0; i<m; i++){
        cin>>h;
        en=mess.substr(0,h);
        mess.erase(0,h);
        mess.insert(mess.end,en);
    }
    printf("%s\n",mess);
    return 0;
}
    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: request for member 'substr' in 'mess', which is of non-class type 'char [200]'
   12 |         en=mess.substr(0,h);
      |                 ^~~~~~
a.cc:13:14: error: request for member 'erase' in 'mess', which is of non-class type 'char [200]'
   13 |         mess.erase(0,h);
      |              ^~~~~
a.cc:14:14: error: request for member 'insert' in 'mess', which is of non-class type 'char [200]'
   14 |         mess.insert(mess.end,en);
      |              ^~~~~~
a.cc:14:26: error: request for member 'end' in 'mess', which is of non-class type 'char [200]'
   14 |         mess.insert(mess.end,en);
      |                          ^~~
Language: C++

#include<iostream>
#include<cctype>
#include<string>
using namespace std;

string shuffle(string str,int h){
    string head = str.substr(0,h);
    string tail = str.substr(h,str.size()-h);
    return tail + head;
}

int main(){
    string card;
    int m,h;
    while(1){
        cin >> card;
        if(card="-") break;
        cin >> m;
        for(int i=0;i<m;i++){
            cin >> h;
            shuffle(card,h);
        }
        cout << card << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: could not convert 'card.std::__cxx11::basic_string<char>::operator=(((const char*)"-"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |         if(card="-") break;
      |            ~~~~^~~~
      |                |
      |                std::__cxx11::basic_string<char>
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>

using namespace std;

int main()
{
    string word;
    int m, h;

    while (true)
    {
        cin >> word;
        if (word == "-")
            break;

        cin >> m;
        for (int i = 0; i < m; i++)
        {
            scanf("%d", h);
            word += word.substr(0, h)
                        word.erase(0, h);
            cout << word << endl;
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:38: error: expected ';' before 'word'
   21 |             word += word.substr(0, h)
      |                                      ^
      |                                      ;
   22 |                         word.erase(0, h);
      |                         ~~~~
Language: C++

#include<iostream>
#inclde<cstdio>
#include<string>

using namespace std;

int main() {
    string str, str1, str2;
    int m, h;
    while true() {
        cin >> str;
        if (str == "-") break;
        cin >> m;
        for (int i = 0; i < m; i++) {
            cin >> h;
            str1 = str.substr(0, h);
            str2 = str.substr(h, str.size()-h);
            str = str1 + str2;
        }
        cout << str << endl;
    }
    return 0;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inclde; did you mean #include?
    2 | #inclde<cstdio>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:10:11: error: expected '(' before 'true'
   10 |     while true() {
      |           ^~~~
      |           (
a.cc:10:15: error: expression cannot be used as a function
   10 |     while true() {
      |           ~~~~^~
a.cc:10:17: error: expected ')' before '{' token
   10 |     while true() {
      |           ~~~~  ^~
      |                 )
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main() {
string word;
int m, h;
while (true) {
cin >> word;
if (word == "-"）
break;
cin >> m;
for (int i = 0; i < m; i++) {
cin >> h;
word +=  word.substr(0, h);
word.erase(o, h);
}
cout << word << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: unable to find string literal operator 'operator""\U0000ff09' with 'const char [2]', 'long unsigned int' arguments
    9 | if (word == "-"）
      |             ^~~~~
a.cc:11:9: error: expected ')' before ';' token
   11 | cin >> m;
      |         ^
      |         )
a.cc:9:4: note: to match this '('
    9 | if (word == "-"）
      |    ^
a.cc:15:12: error: 'o' was not declared in this scope
   15 | word.erase(o, h);
      |            ^
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
int main() {
string word;
int m, h;
while (true) {
cin >> word;
if (word == "-"）
break;
cin >> m;
for (int i = 0; i < m; i++) {
cin >> h;
word +=  word.substr(0, h);
word.erase(0, h);
}
cout << word << endl;
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: unable to find string literal operator 'operator""\U0000ff09' with 'const char [2]', 'long unsigned int' arguments
    9 | if (word == "-"）
      |             ^~~~~
a.cc:11:9: error: expected ')' before ';' token
   11 | cin >> m;
      |         ^
      |         )
a.cc:9:4: note: to match this '('
    9 | if (word == "-"）
      |    ^
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

int main() 
{
    string word;
    int m, h;
    while (true) {
        cin >> word;
        if (word == "-"）
            break;
            
        cin >> m;
        for (int i = 0; i < m; i++) 
        {
            cin >> h;
            word +=  word.substr(0, h);
            word.erase(0, h);
        }
        cout << word << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: unable to find string literal operator 'operator""\U0000ff09' with 'const char [2]', 'long unsigned int' arguments
   11 |         if (word == "-"）
      |                     ^~~~~
a.cc:14:17: error: expected ')' before ';' token
   14 |         cin >> m;
      |                 ^
      |                 )
a.cc:11:12: note: to match this '('
   11 |         if (word == "-"）
      |            ^
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

int main() 
{
    string word;
    int m, h;
    while (true) {
        cin >> word;
        if (word == "-"）{
            break;
        ｝        
        cin >> m;
        for (int i = 0; i < m; i++) 
        {
            cin >> h;
            word +=  word.substr(0, h);
            word.erase(0, h);
        }
        cout << word << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: unable to find string literal operator 'operator""\U0000ff09' with 'const char [2]', 'long unsigned int' arguments
   11 |         if (word == "-"）{
      |                     ^~~~~
a.cc:11:26: error: expected ')' before '{' token
   11 |         if (word == "-"）{
      |            ~             ^
      |                          )
a.cc:23:1: error: expected primary-expression before '}' token
   23 | }
      | ^
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
using namespace std;
int main(){
    string str1,str2;
    int n,m;
    while(1){
        cin>>str1;
        if(str1[0]=='-'){
            break;
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>m;
            str2 = substr(0,n);
            erase(0,n);
            str1 =  str1 + str2;
        }
        cout<<str1<<endl;
        str1="";
    }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   17 |             str2 = substr(0,n);
      |                    ^~~~~~
      |                    strstr
a.cc:18:13: error: 'erase' was not declared in this scope
   18 |             erase(0,n);
      |             ^~~~~
Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
 
int main() 
{
    string word;
    int m, h;
    while(true)
    {
        cin >> word;
        if (word == "-")
            break;
         
        cin >> m;
        for (int i = 0; i < m; i++) 
        {
            scanf(%d, &h);
            word += word.substr(0, h);
            word.erase(0, h);
        }
        cout << word << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: expected primary-expression before '%' token
   18 |             scanf(%d, &h);
      |                   ^
a.cc:18:20: error: 'd' was not declared in this scope
   18 |             scanf(%d, &h);
      |                    ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    string str1,str2;
    int n,m,a;
    while(true){
        cin>>str1;
        str2="";
        a=str1.size();
        for(int i=0;i<a;i++){
            str2+=str1[i];
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            str1.insert(str2.substr(0,h-1));
            str1.erase(0,h-1)
        }
        cout<<str1<<endl;
        if(str1=="-") break;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: 'h' was not declared in this scope
   15 |             cin>>h;
      |                  ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string str1,str2;
    int n,h,a;
    while(true){
        cin>>str1;
        str2="";
        a=str1.size();
        for(int i=0;i<a;i++){
            str2+=str1[i];
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            str1+str2.substr(0,h);
            str1.erase(0,h-1)
        }
        cout<<str1<<endl;
        if(str1=="-") break;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: expected ';' before '}' token
   18 |             str1.erase(0,h-1)
      |                              ^
      |                              ;
   19 |         }
      |         ~
Language: C++

#include<iostream>
#include<string>
#include<cctype>
using namespace std;
int main(){
    string str1,str2;
    int n,h,a;
    while(true){
        cin>>str1;
        if(str1=="-") break;
        str2="";
        str1=tolower(str1)
        a=str1.size();
        for(int i=0;i<a;i++){
            str2+=str1[i];
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            str1+str2.substr(0,h);
            str1.erase(0,h);
        }
        cout<<str1<<endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: no matching function for call to 'tolower(std::string&)'
   12 |         str1=tolower(str1)
      |              ~~~~~~~^~~~~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include<string>
#include<cctype>
using namespace std;
int main(){
    string str1,str2;
    int n,h,a;
    while(true){
        cin>>str1;
        if(str1=="-") break;
        str2="";
        str1=tolower(str1);
        a=str1.size();
        for(int i=0;i<a;i++){
            str2+=str1[i];
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            str1+str2.substr(0,h);
            str1.erase(0,h);
        }
        cout<<str1<<endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: no matching function for call to 'tolower(std::string&)'
   12 |         str1=tolower(str1);
      |              ~~~~~~~^~~~~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/ios:43:
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string str1,str2;
    int n,h,a;
    while(true){
        cin>>str1;
        if(str1=="-") break;
        str2="";
        a=str1.size();
        for(int i=0;i<a;i++){
            str2+=str1[i];
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            str1+str2.substr(0,h);
            str1.erase(str1.begin(),str.begin()+h+1);
        }
        cout<<str1<<endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:37: error: 'str' was not declared in this scope; did you mean 'str2'?
   19 |             str1.erase(str1.begin(),str.begin()+h+1);
      |                                     ^~~
      |                                     str2
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string str1,str2;
    int n,h,a,b;
    while(true){
        cin>>str1;
        if(str1=="-") break;
        str2="";
        a=str1.size();
        for(int i=0;i<a;i++){
            str2+=str1[i];
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            str1+str2.substr(0,h);
            b=str1.begin();
            str1.erase(str1.begin(),str1.begin()+h);
        }
        cout<<str1<<endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'int' in assignment
   19 |             b=str1.begin();
      |               ~~~~~~~~~~^~
      |                         |
      |                         std::__cxx11::basic_string<char>::iterator
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string str1,str2;
    int n,h,a,b;
    while(true){
        cin>>str1;
        if(str1=="-") break;
        str2="";
        a=str1.size();
        for(int i=0;i<a;i++){
            str2+=str1[i];
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            str1+str2.substr(0,h);
            b=str1.begin();
            str1.erase(b,b+h);
        }
        cout<<str1<<endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'int' in assignment
   19 |             b=str1.begin();
      |               ~~~~~~~~~~^~
      |                         |
      |                         std::__cxx11::basic_string<char>::iterator
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string str1,str2;
    int n,h,a,;
    while(true){
        cin>>str1;
        if(str1=="-") break;
        str2="";
        a=str1.size();
        for(int i=0;i<a;i++){
            str2+=str1[i];
        }
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            str1+str2.substr(0,h);
            str1.erase(0,h);
        }
        cout<<str1<<endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: expected unqualified-id before ';' token
    6 |     int n,h,a,;
      |               ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string str1,first,last,mix;
    int n,h,a;
    while(true){
        cin>>str1;
        if(str1=="-") break;
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            firts=str1.substr(0,h);
            last=str1.substr(h,a-h);
            mix=last+first;
            
        }
        cout<<mix<<endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'firts' was not declared in this scope; did you mean 'first'?
   13 |             firts=str1.substr(0,h);
      |             ^~~~~
      |             first
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string str1,first,last,mix;
    int n,h,a;
    while(true){
        cin>>str1;
        if(str1=="-") break;
        cin>>n;
        for(int i=0;i<n;i++){
            cin>>h;
            first=str1.substr(0,h);
            last=str1.substr(h,a-h);
            mix=last+first;
            str1=mix
            
        }
        cout<<mix<<endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected ';' before '}' token
   16 |             str1=mix
      |                     ^
      |                     ;
   17 | 
   18 |         }
      |         ~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
    string word;
    int m,h;
    while(1){
        cin >> word;
        if (word = "-") break;
        int len = word.size();
        cin >> m;
        for(int i = 0; i < m; i++){
            cin >> h;
            word = word.substr(len-m,len-1) + word.substr(0,len-m-1);
        }
        cout << word << endl;
        return 0;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: could not convert 'word.std::__cxx11::basic_string<char>::operator=(((const char*)"-"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |         if (word = "-") break;
      |             ~~~~~^~~~~
      |                  |
      |                  std::__cxx11::basic_string<char>
Language: C++

#include<iostream>
#include<string>
#include<cctype>
using namespace std;
string Shf(string s, int n){
    string t = s.substr(0,n);
    s.erase(0,n);
    s += t;
    return s;
}
int main(){
    str s;
    int m,n;
    while(1){
        cin >> s;
        if (s == "-") break;
        cin >> m;
        for(int i = 0;i < m; i++){
            cin >> n;
            Shf(s,n)
        }
        cout << s << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'str' was not declared in this scope; did you mean 'std'?
   12 |     str s;
      |     ^~~
      |     std
a.cc:15:16: error: 's' was not declared in this scope
   15 |         cin >> s;
      |                ^
Language: C++

#include<iostream>
#include<string>
#include<cctype>
using namespace std;
string Shf(string s, int n){
    string t = s.substr(0,n);
    s.erase(0,n);
    s += t;
    return s;
}
int main(){
    string s;
    int m,n;
    while(1){
        cin >> s;
        if (s == "-") break;
        cin >> m;
        for(int i = 0;i < m; i++){
            cin >> n;
            Shf(s,n)
        }
        cout << s << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: expected ';' before '}' token
   20 |             Shf(s,n)
      |                     ^
      |                     ;
   21 |         }
      |         ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: could not convert 'str.std::__cxx11::basic_string<char>::operator=(((const char*)"-"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |         if(str = "-")break;
      |            ~~~~^~~~~
      |                |
      |                std::__cxx11::basic_string<char>
a.cc:13:19: error: 'substr' was not declared in this scope
   13 |             str = substr(h,str.size())+substr(0,h-1);
      |                   ^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'substr' was not declared in this scope
   13 |             str = substr(h,str.size())+substr(0,h-1);
      |                   ^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:62: error: expected primary-expression before ')' token
   14 |             str = str.substr(h+1,str.size()-h)+ str.substr(0,);
      |                                                              ^
Language: C++

#include<iostream>
#include<cctype>
#include<string>
using namespace std;

string shuffle(string str, int len){
    string head = str.substr(0,h);
    string tail = str.substr(h,str.size()-h);
    return tail+ head;
}
int main(){
    string target;
    int time;
    int len;
    
    while(1){
        cin >> target >> time;
        if (target =="-") break;
        for (int i =0; i<time; i++){
            cin >> len;
            target = shuffle(target,len); 
        }
        cout << target << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'std::string shuffle(std::string, int)':
a.cc:7:32: error: 'h' was not declared in this scope
    7 |     string head = str.substr(0,h);
      |                                ^
Language: C++

#include<iosream>
#include<stdio.h>
#include<cctype>
#include<cstring>
#include<string>
using namespace std;
int main(){
    int h=0,m=0;
    string s,p;
    while(1){
        cin >> s >> m;
        if(s == "-")break;
        
        for(int i=0;i<m;i++){
            cin >> h;
            p = s.substr(0,h);
            s = s.erase(0,h);
            s += p;
        }
        cout << s << endl;
    }
}


Compiler output:
a.cc:1:9: fatal error: iosream: No such file or directory
    1 | #include<iosream>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
#include<string>

int main(){
    string str,buf;
    int m,h;
    while(scanf("%s",&str) && (str != '-')){
        scanf("%d",&m)
        for(int i = 1;i <= m;i++){
            scanf("%d",&h);
            buf = str.substr(0,h);
            str.erase(0,h-1);
            str += buf;
        }
        printf("%s\n",str);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope
    5 |     string str,buf;
      |     ^~~~~~
a.cc:5:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:23: error: 'str' was not declared in this scope; did you mean 'std'?
    7 |     while(scanf("%s",&str) && (str != '-')){
      |                       ^~~
      |                       std
a.cc:8:23: error: expected ';' before 'for'
    8 |         scanf("%d",&m)
      |                       ^
      |                       ;
    9 |         for(int i = 1;i <= m;i++){
      |         ~~~            
a.cc:9:23: error: 'i' was not declared in this scope
    9 |         for(int i = 1;i <= m;i++){
      |                       ^
Language: C++

#include<stdio.h>
#include<string>

using namespace std;

int main(){
    string str,buf;
    int m,h;
    while(scanf("%s",&str) && (str != "-")){
        scanf("%d",&m)
        for(int i = 1;i <= m;i++){
            scanf("%d",&h);
            buf = str.substr(0,h);
            str.erase(0,h-1);
            str += buf;
        }
        printf("%s\n",str);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before 'for'
   10 |         scanf("%d",&m)
      |                       ^
      |                       ;
   11 |         for(int i = 1;i <= m;i++){
      |         ~~~            
a.cc:11:23: error: 'i' was not declared in this scope
   11 |         for(int i = 1;i <= m;i++){
      |                       ^
Language: C++

#include<iostream>
#include<string>
#include<cctype>
using namespace std;

string shuffle(string str,int h){
    string head = str.substr(0,h);
    string tail = str.substr(h.str.size()-h);
    return tail + head ;
}

int main(){
    string cards;
    int m,h;
    
    while(1){
        cin >> cards;
        if (cards == "-") break;
        
        cin >> m;
        for (int i=0; i<m; i++){
            cin >> h;
            cards= shuffle(cards,h);
        }
        cout << cards << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'std::string shuffle(std::string, int)':
a.cc:8:32: error: request for member 'str' in 'h', which is of non-class type 'int'
    8 |     string tail = str.substr(h.str.size()-h);
      |                                ^~~
Language: C++

#include<iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main(){
    string card;
    int m, h;
    while(1){
        cin >> card;
        cin >> m;
        
        for(int j = 0; j < m; j++){
            for(int i = 0; i < h; i++){
                card.insert(card.end(), string[i]);
                card.erase(string[i]);
            }
        }
    
    cout << card << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: expected primary-expression before '[' token
   14 |                 card.insert(card.end(), string[i]);
      |                                               ^
a.cc:15:34: error: expected primary-expression before '[' token
   15 |                 card.erase(string[i]);
      |                                  ^
Language: C++

#include<iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main(){
    string card;
    int m, h;
    while(1){
        cin >> card;
        cin >> m;
        
        for(int j = 0; j < m; j++){
            for(int i = 0; i < h; i++){
                card.insert(card.end(), string[i]);
                card.erase(1,string[i]);
            }
        }
    
    cout << card << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: expected primary-expression before '[' token
   14 |                 card.insert(card.end(), string[i]);
      |                                               ^
a.cc:15:36: error: expected primary-expression before '[' token
   15 |                 card.erase(1,string[i]);
      |                                    ^
Language: C++

#include<iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main(){
    string card,sub;
    int m, h;
    
    while(1){
        cin >> card;
        
        if(card == "_") break;
        
        cin >> m;
        
        for(int i = 0; j < m; i++){
            cin >> h;
            sub = card.substr(0, h);
            card.erase(0.h);
            card = card + sub;
        }
    
    cout << card << endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: 'j' was not declared in this scope
   16 |         for(int i = 0; j < m; i++){
      |                        ^
a.cc:19:24: error: unable to find numeric literal operator 'operator""h'
   19 |             card.erase(0.h);
      |                        ^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
    
    while(1){
        cin>>str;
        if (str=='-') break;
    }
    
    while(1){
        int i=1;
        cin>>i;
        str1 = str.substr(1, i);
        str2 = str.substr(i+1, size.str());
        str3 = str1 + str2;
    }
        
    cout<<str3<<endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'str' was not declared in this scope; did you mean 'std'?
    8 |         cin>>str;
      |              ^~~
      |              std
a.cc:15:9: error: 'str1' was not declared in this scope
   15 |         str1 = str.substr(1, i);
      |         ^~~~
a.cc:15:16: error: 'str' was not declared in this scope; did you mean 'std'?
   15 |         str1 = str.substr(1, i);
      |                ^~~
      |                std
a.cc:16:9: error: 'str2' was not declared in this scope
   16 |         str2 = str.substr(i+1, size.str());
      |         ^~~~
a.cc:16:37: error: overloaded function with no contextual type information
   16 |         str2 = str.substr(i+1, size.str());
      |                                     ^~~
a.cc:17:9: error: 'str3' was not declared in this scope
   17 |         str3 = str1 + str2;
      |         ^~~~
a.cc:20:11: error: 'str3' was not declared in this scope
   20 |     cout<<str3<<endl;
      |           ^~~~
Language: C++

#include<iostream>
#include<string>
#include<cctype>
using namespace std;

string shuffle(string str, int h){
    string str1 = str.substr(0,h);
    string str2 = str.substr(h, str.size()-h);
    return str2 + str1;
}

int main(){
    string card;
    int i, h;
    
    while(1){
        cin>>card;
        if (card=="-") break;
        
        cin>>i;
        for(int k=0; k<i; k++){
            cin>>h;
            card=suffle(card,h);
        }
        cout<<card<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: 'suffle' was not declared in this scope; did you mean 'shuffle'?
   23 |             card=suffle(card,h);
      |                  ^~~~~~
      |                  shuffle
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main () {
    string str;
    int m, h, i;
    
    while(cin >> str, str != "-" ) {
        cin >> m;
        for(i=0;i<m;i++) {
            cin >> h;
            str = str.substr(h+1,str.size() - h,) + str.sustr(0,h);
        }
        cout << str << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:49: error: expected primary-expression before ')' token
   14 |             str = str.substr(h+1,str.size() - h,) + str.sustr(0,h);
      |                                                 ^
a.cc:14:57: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sustr'; did you mean 'substr'?
   14 |             str = str.substr(h+1,str.size() - h,) + str.sustr(0,h);
      |                                                         ^~~~~
      |                                                         substr
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main () {
    string str;
    int m, h, i;
    
    while(cin >> str, str != "-" ) {
        cin >> m;
        for(i=0;i<m;i++) {
            cin >> h;
            str = str.substr(h+1,str.size() - h,) + str.substr(0,h);
        }
        cout << str << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:49: error: expected primary-expression before ')' token
   14 |             str = str.substr(h+1,str.size() - h,) + str.substr(0,h);
      |                                                 ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
	string str;
	int m, h, i;

	while (cin >> str, str != "-") {
		cin >> m;
		for (i = 0; i<m; i++) {
			cin >> h;
			str = str.substr(h, str.size() - h) + str.substr(0,h)
		}
		cout << str << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:78: error: expected ';' before '}' token
   14 |                         str = str.substr(h, str.size() - h) + str.substr(0,h)
      |                                                                              ^
      |                                                                              ;
   15 |                 }
      |                 ~
Language: C++

int main(){
	string card;int h,m;
	string a,b;
	
	while(true){
		cin>>card;
		if(card=="-")break;
		cin>>m;
		for(int i=0;i<m;i++){
			cin>>h;
			a=card.substr(0,h);
			b=card.substr(h,card.size());
			card=b+a;
		}
		cout<<card<<endl;
	}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'string' was not declared in this scope
    2 |         string card;int h,m;
      |         ^~~~~~
a.cc:3:15: error: expected ';' before 'a'
    3 |         string a,b;
      |               ^~
      |               ;
a.cc:6:17: error: 'cin' was not declared in this scope
    6 |                 cin>>card;
      |                 ^~~
a.cc:6:22: error: 'card' was not declared in this scope
    6 |                 cin>>card;
      |                      ^~~~
a.cc:11:25: error: 'a' was not declared in this scope
   11 |                         a=card.substr(0,h);
      |                         ^
a.cc:12:25: error: 'b' was not declared in this scope
   12 |                         b=card.substr(h,card.size());
      |                         ^
a.cc:15:17: error: 'cout' was not declared in this scope
   15 |                 cout<<card<<endl;
      |                 ^~~~
a.cc:15:29: error: 'endl' was not declared in this scope
   15 |                 cout<<card<<endl;
      |                             ^~~~
Language: C++

#include<iostream>
#include<cmath>
#include<string>
#include<cctype>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
        for(;;){
        char c[200];
        int t;
        scanf("%s",c);
        if (c[0]=='-') break;
        int l=strlen(c);
        scanf("%d",&t);
        for (int i=0;i<t;i++) {
            int sw;
            char d[200];
            scanf("%d",&sw);
            for (int j=sw;j<l;j++) {
                d[j-sw]=c[j];
                //printf("%s %c\n",d, c[j]);
                //printf("%s\n",d);
            }
            for (int j=0;j<sw;j++) {
                d[l-sw+j]=c[j];
                //printf("%s %c\n",d, c[j]);
                //printf("%s\n",d);
            }
            strcpy(c,d);

        }
        printf("%s\n",c);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'strlen' was not declared in this scope
   14 |         int l=strlen(c);
      |               ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include<algorithm>
  +++ |+#include <cstring>
    7 | using namespace std;
a.cc:30:13: error: 'strcpy' was not declared in this scope
   30 |             strcpy(c,d);
      |             ^~~~~~
a.cc:30:13: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <cstdio>
#include <cstring>

int main(void)
{
	string word, ans;
	int n, i, d;

	scanf("%s", word);

	while(scanf("%d", &n)!=EOF && word !="-"){
		ans = word;

		for(i=0;i<n;i++){
			scanf("%d", &h);
			ans = ans.substr(h+1) + ans.substr(0, h);
		}
		printf("%s\n", ans);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'string' was not declared in this scope; did you mean 'stdin'?
    6 |         string word, ans;
      |         ^~~~~~
      |         stdin
a.cc:9:21: error: 'word' was not declared in this scope
    9 |         scanf("%s", word);
      |                     ^~~~
a.cc:12:17: error: 'ans' was not declared in this scope
   12 |                 ans = word;
      |                 ^~~
a.cc:15:38: error: 'h' was not declared in this scope
   15 |                         scanf("%d", &h);
      |                                      ^
Language: C++

#include <cstdio>
#include <string>

using namespace std;

int main(void)
{
	string word, ans;
	int n, i, d;

	scanf("%s", word);

	while(scanf("%d", &n)!=EOF && word !="-"){
		ans = word;

		for(i=0;i<n;i++){
			scanf("%d", &h);
			ans = ans.substr(h+1) + ans.substr(0, h);
		}
		printf("%s\n", ans);
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:38: error: 'h' was not declared in this scope
   17 |                         scanf("%d", &h);
      |                                      ^
Language: C++

#include <cstdio>
#include <string>

using namespace std;

int main(void)
{
	string word, ans;
	int n, i, h;



	while(cin >> word && word !="-"){
		cin >> n;
		ans = word;

		for(i=0;i<n;i++){
			cin >> h;
			ans = ans.substr(h+1) + ans.substr(0, h);
		}
		cout << ans << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'cin' was not declared in this scope
   13 |         while(cin >> word && word !="-"){
      |               ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | 
a.cc:21:17: error: 'cout' was not declared in this scope
   21 |                 cout << ans << endl;
      |                 ^~~~
a.cc:21:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:21:32: error: 'endl' was not declared in this scope
   21 |                 cout << ans << endl;
      |                                ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 |
Language: C++

#include <cstdio>
#include <string>

using namespace std;

int main(void)
{
	string word, ans;
	int n, i, h;



	while(scanf("%s", word)!=EOF && word !="-"){
		scanf("%d", &n);
		ans = word;

		for(i=0;i<n;i++){
			scanf("%d", &h);
			ans = ans.substr(h+1) + ans.substr(0, h);
		}
		cout << ans << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: 'cout' was not declared in this scope
   21 |                 cout << ans << endl;
      |                 ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | 
a.cc:21:32: error: 'endl' was not declared in this scope
   21 |                 cout << ans << endl;
      |                                ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 |
Language: C++

#include <cstdio>
#include <string>

using namespace std;

int main(void)
{
	string word, ans;
	int n, i, h;

	while(scanf("%s", &word)!=EOF && word !="-"){
		scanf("%d", &n);
		ans = word;

		for(i=0;i<n;i++){
			scanf("%d", &h);
			ans = ans.substr(h+1) + ans.substr(0, h);
		}
		cout << ans << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout << ans << endl;
      |                 ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | 
a.cc:19:32: error: 'endl' was not declared in this scope
   19 |                 cout << ans << endl;
      |                                ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 |
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
  string ss, left, right;
  int times, in;
  cin >> ss >> times;

  while (ss) {
    for (int i = 0; i < times; i++) {
      cin >> in;
      for (int j = 1; j <= in; j++) {
        right += ss[in + j];
      }
      for (int k = 0; k < ss.size() - in; k++) {
        left += ss[k];
      }
    }
    cout << left + right << endl;
    cin >> ss;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: could not convert 'ss' from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
   11 |   while (ss) {
      |          ^~
      |          |
      |          std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<string.h>
#include<stdio.h>
#include<stdlib.h>

int main()
{
	char deck[201];
	fgets(deck, sizeof(deck),stdin);
	int m;
	scanf("%d", &m);
	fflush(stdin);
	int i;
	for (i = 1; i <= m; i++)
	{
		char result[201];
		if (i == 1)
		{
			int n;
			scanf("%d", &n, 101);
			char  catcher[201] = { 0 };
			strncpy(catcher, deck, n);
			strncpy(result, &deck[n], strlen(deck) - n - 1);
			strcat(result, 201, catcher);
			printf("%s\n", result);
		}
		else
		{
			int n;
			scanf("%d", &n, 101);
			char catcher[201] = { 0 };
			strncpy(catcher, &result[n], strlen(result) - n );
			strncat(catcher, result, n);
			strcpy(result, catcher);
			printf("%s\n", result);
		}


	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:40: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   23 |                         strcat(result, 201, catcher);
      |                                        ^~~
      |                                        |
      |                                        int
a.cc:23:31: error: too many arguments to function 'char* strcat(char*, const char*)'
   23 |                         strcat(result, 201, catcher);
      |                         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from a.cc:1:
/usr/include/string.h:149:14: note: declared here
  149 | extern char *strcat (char *__restrict __dest, const char *__restrict __src)
      |              ^~~~~~
Language: C++

#include<string.h>
#include<stdio.h>
#include<stdlib.h>

int main()
{
	char sent[201], temp[201];
	int i, j, k;
	while (scanf("%s", sent))
	{
		if (strcmp(sent, "-") == 0) break;
		scanf("%d", &i);
		for (j = 1; j <= i; j++)
		{
			scanf("%d", &k);
			strcat(temp, sent);
			strcat(sent, temp + k);
			tem[k] = '\0';
			strcat(sent, temp);
		}
		puts(sent);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: 'tem' was not declared in this scope; did you mean 'temp'?
   18 |                         tem[k] = '\0';
      |                         ^~~
      |                         temp
Language: C++

#include <iostream>
#include <string>
using namespace std;

void shuffle(char *a , int h){
	char tmp[201];
	char mov[201];
	size_t len=strlen(a);
	strcpy(tmp , (const char*)a+h);
	strncpy(mov , a , h);
	mov[h]='\0';
	strcat(tmp , mov);
	strcpy(a , (const char*)tmp);
	return;
}

int main(){
	char card[201]={0};
	char ans[201]={0};
	int i , m;
	int h[100];
	while(1){
		cin>>card;
		if ( card[0]=='-' ) break;
	cin>>m;
		for(i=0;i<m;i++){
			cin>>h[i];
			shuffle(card , h[i]);
		}
		strcpy(ans , card);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'void shuffle(char*, int)':
a.cc:8:20: error: 'strlen' was not declared in this scope
    8 |         size_t len=strlen(a);
      |                    ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
a.cc:9:9: error: 'strcpy' was not declared in this scope
    9 |         strcpy(tmp , (const char*)a+h);
      |         ^~~~~~
a.cc:9:9: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:10:9: error: 'strncpy' was not declared in this scope
   10 |         strncpy(mov , a , h);
      |         ^~~~~~~
a.cc:10:9: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:12:9: error: 'strcat' was not declared in this scope
   12 |         strcat(tmp , mov);
      |         ^~~~~~
a.cc:12:9: note: 'strcat' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc: In function 'int main()':
a.cc:30:17: error: 'strcpy' was not declared in this scope
   30 |                 strcpy(ans , card);
      |                 ^~~~~~
a.cc:30:17: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <cstring>
using namespace std;

void shuffle(char *a , int h){
	char tmp[201];
	char mov[201];
	size_t len=strlen(a);
	strcpy(tmp , (const char*)a+h);
	strncpy(mov , a , h);
	mov[h]='\0';
	strcat(tmp , mov);
	strcpy(a , (const char*)tmp);
	return;
}

int main(){
	char card[201]={0};
	char ans[201]={0};
	int i , m;
	int h[100];
	while(1){
		cin>>card;
		m=strlen(card)
		if ( card[0]=='-'&& m=1 ) break;
	cin>>m;
		for(i=0;i<m;i++){
			cin>>h[i];
			shuffle(card , h[i]);
		}
		strcpy(ans , card);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:31: error: expected ';' before 'if'
   24 |                 m=strlen(card)
      |                               ^
      |                               ;
   25 |                 if ( card[0]=='-'&& m=1 ) break;
      |                 ~~
Language: C++

#include <iostream>
#include <cstring>
using namespace std;

void shuffle(char *a , int h){
	char tmp[201];
	char mov[201];
	size_t len=strlen(a);
	strcpy(tmp , (const char*)a+h);
	strncpy(mov , a , h);
	mov[h]='\0';
	strcat(tmp , mov);
	strcpy(a , (const char*)tmp);
	return;
}

int main(){
	char card[201]={0};
	char ans[201]={0};
	int i , m;
	int h[100];
	while(1){
		cin>>card;
		m=strlen(card)
		if ( card[0]=='-'&& m==1 ) break;
	cin>>m;
		for(i=0;i<m;i++){
			cin>>h[i];
			shuffle(card , h[i]);
		}
		strcpy(ans , card);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:31: error: expected ';' before 'if'
   24 |                 m=strlen(card)
      |                               ^
      |                               ;
   25 |                 if ( card[0]=='-'&& m==1 ) break;
      |                 ~~