scrivener.cpp:3:1: error: 'string' does not name a type; did you mean 'struct'?
string pal;
^~~~~~
struct
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:8:3: error: 'pal' was not declared in this scope
pal.push_back(L):
^~~
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:14:25: error: 'pal' was not declared in this scope
for(int i=0;i<U;i++)pal.pop_back();
^~~
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:19:10: error: 'pal' was not declared in this scope
return pal[P];
^~~