Language: C++

#include<stdio.h>
#include<string>
#include<iostream>
using namespace std;

struct Q{string y;}

int main(){

int n[1001][101];
struct Q q[1001];
char x;
int p,pp;
string st;

scanf("%d",&n);

while(1){
cin>>st;

if(st=="push"){cin>>p>>x;
q[p].y=q[p].y+st;}
if(st=="pop"){cin>>p;cout<<q[p].y[([q[p].y.size())];
cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}

if(st=="move"){cin>>p>>pp;

q[pp].y=q[pp].y+q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
if(st=="quit")break;
}
return 0;
}

Compiler output:
a.cc:6:20: error: expected ';' after struct definition
    6 | struct Q{string y;}
      |                    ^
      |                    ;
a.cc: In function 'int main()':
a.cc:23:38: error: expected ',' before '[' token
   23 | if(st=="pop"){cin>>p;cout<<q[p].y[([q[p].y.size())];
      |                                      ^
      |                                      ,
a.cc:23:38: error: expected identifier before '[' token
a.cc: In lambda function:
a.cc:23:52: error: expected '{' before ';' token
   23 | if(st=="pop"){cin>>p;cout<<q[p].y[([q[p].y.size())];
      |                                                    ^
a.cc: In function 'int main()':
a.cc:23:52: error: expected ')' before ';' token
   23 | if(st=="pop"){cin>>p;cout<<q[p].y[([q[p].y.size())];
      |                                   ~                ^
      |                                                    )
a.cc:23:52: error: expected ']' before ';' token
   23 | if(st=="pop"){cin>>p;cout<<q[p].y[([q[p].y.size())];
      |                                                    ^
      |                                                    ]
a.cc:23:34: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'main()::<lambda()>')
   23 | if(st=="pop"){cin>>p;cout<<q[p].y[([q[p].y.size())];
      |                                  ^
In file included from /usr/include/c++/14/string:54,
                 from a.cc:2:
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |                   ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1265 |       operator[](size_type __pos)
      |                  ~~~~~~~~~~^~~~~
a.cc:24:17: error: expected ',' before '[' token
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                 ^
      |                 ,
a.cc:24:17: error: expected identifier before '[' token
a.cc: In lambda function:
a.cc:24:31: error: expected '{' before ';' token
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                               ^
a.cc: In function 'int main()':
a.cc:24:31: error: expected ')' before ';' token
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |              ~                ^
      |                               )
a.cc:24:31: error: expected ']' before ';' token
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                               ^
      |                               ]
a.cc:24:13: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'main()::<lambda()>')
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |             ^
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |                   ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1265 |       operator[](size_type __pos)
      |                  ~~~~~~~~~~^~~~~
a.cc:24:56: error: expected ',' before '[' token
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                                                        ^
      |                                                        ,
a.cc:24:56: error: expected identifier before '[' token
a.cc: In lambda function:
a.cc:24:70: error: expected '{' before ';' token
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                                                                      ^
a.cc: In function 'int main()':
a.cc:24:70: error: expected ')' before ';' token
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                                                     ~                ^
      |                                                                      )
a.cc:24:70: error: expected ']' before ';' token
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                                                                      ^
      |                                                                      ]
a.cc:24:52: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'main()::<lambda()>')
   24 | cout<<q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                                                    ^
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |                   ~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:1265:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1265 |       operator[](size_type __pos)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1265:28: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1265 |       operator[](size_type __pos)
      |                  ~~~~~~~~~~^~~~~
a.cc:28:27: error: expected ',' before '[' token
   28 | q[pp].y=q[pp].y+q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                           ^
      |                           ,
a.cc:28:27: error: expected identifier before '[' token
a.cc: In lambda function:
a.cc:28:41: error: expected '{' before ';' token
   28 | q[pp].y=q[pp].y+q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                                         ^
a.cc: In function 'int main()':
a.cc:28:41: error: expected ')' before ';' token
   28 | q[pp].y=q[pp].y+q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                        ~                ^
      |                                         )
a.cc:28:41: error: expected ']' before ';' token
   28 | q[pp].y=q[pp].y+q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                                         ^
      |                                         ]
a.cc:28:23: error: no match for 'operator[]' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'main()::<lambda()>')
   28 | q[pp].y=q[pp].y+q[p].y[([q[p].y.size())];q[p].y=q[p].y-q[p].y[([q[p].y.size())];}
      |                       ^
/usr/include/c++/14/bits/basic_string.h:1247:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1247 |       operator[] (size_type __pos) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:1247:29: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsi