Submission #309637

#TimeUsernameProblemLanguageResultExecution timeMemory
309637rc_catuntaCrayfish scrivener (IOI12_scrivener)C++14
Compilation error
0 ms0 KiB

char seq[]="";

void Init() {
	seq="";
}

void TypeLetter(char L) {

  seq=seq+L;

}

void UndoCommands(int U) {

}

char GetLetter(int P) {

  return seq[P];

}

Compilation message (stderr)

scrivener.cpp: In function 'void Init()':
scrivener.cpp:5:6: error: invalid array assignment
    5 |  seq="";
      |      ^~
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:10:11: error: incompatible types in assignment of 'char*' to 'char [1]'
   10 |   seq=seq+L;
      |           ^