scrivener.cpp:12:2: error: expected ';' after struct definition
}
^
;
scrivener.cpp: In function 'void Init()':
scrivener.cpp:19:12: error: 'null' was not declared in this scope
s[0] = null;
^~~~
scrivener.cpp:19:12: note: suggested alternative: 'kill'
s[0] = null;
^~~~
kill
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:30:7: warning: operation on 'ptr' may be undefined [-Wsequence-point]
s[++ptr] = s[ptr - u];
^~~~~
scrivener.cpp: In function 'void GetLetter(int)':
scrivener.cpp:36:42: error: 'd' was not declared in this scope
for( int i = 19 ; i >= 0 ; i++ ) if( d >> i & 1 ) now = now -> par[i];
^
scrivener.cpp:37:17: error: return-statement with a value, in function returning 'void' [-fpermissive]
return now->d;
^
scrivener.cpp:34:9: warning: unused variable 'pos' [-Wunused-variable]
int pos = s[ptr]->sz - p - 1;
^~~