scrivener.cpp:2:1: error: 'string' does not name a type; did you mean 'struct'?
string ans="";
^~~~~~
struct
scrivener.cpp: In function 'void Init()':
scrivener.cpp:4:2: error: 'ans' was not declared in this scope
ans="";
^~~
scrivener.cpp: In function 'void Init()':
scrivener.cpp:9:6: error: redefinition of 'void Init()'
void Init() {
^~~~
scrivener.cpp:3:6: note: 'void Init()' previously defined here
void Init() {
^~~~
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:12:2: error: 'ans' was not declared in this scope
ans+=L;
^~~
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:15:13: error: 'ans' was not declared in this scope
if(m>=(int)ans.size()) {
^~~
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:23:9: error: 'ans' was not declared in this scope
return ans[P-1];
^~~