Submission #194128

# Submission time Handle Problem Language Result Execution time Memory
194128 2020-01-15T19:23:58 Z s_avila_g Crayfish scrivener (IOI12_scrivener) C++14
Compilation error
0 ms 0 KB
char last;
string a = "";

void Init() {
}

void TypeLetter(char L) {
    last = L;
    a += last;
}

void UndoCommands(int U) {

}

char GetLetter(int P) {
    last = a[P];
    return last;
}

Compilation message

scrivener.cpp:3:1: error: 'string' does not name a type; did you mean 'struct'?
 string a = "";
 ^~~~~~
 struct
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:10:5: error: 'a' was not declared in this scope
     a += last;
     ^
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:18:12: error: 'a' was not declared in this scope
     last = a[P];
            ^