제출 #309634

#제출 시각아이디문제언어결과실행 시간메모리
309634rc_catunta크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
컴파일 에러
0 ms0 KiB

string seq;

void Init() {
	seq="";
}

void TypeLetter(char L) {

  seq=seq+L;

}

void UndoCommands(int U) {

}

char GetLetter(int P) {

  return seq[P];

}

컴파일 시 표준 에러 (stderr) 메시지

scrivener.cpp:2:1: error: 'string' does not name a type
    2 | string seq;
      | ^~~~~~
scrivener.cpp: In function 'void Init()':
scrivener.cpp:5:2: error: 'seq' was not declared in this scope
    5 |  seq="";
      |  ^~~
scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:10:3: error: 'seq' was not declared in this scope
   10 |   seq=seq+L;
      |   ^~~
scrivener.cpp: In function 'char GetLetter(int)':
scrivener.cpp:20:10: error: 'seq' was not declared in this scope
   20 |   return seq[P];
      |          ^~~