제출 #717649

#제출 시각아이디문제언어결과실행 시간메모리
717649AndrijaMMemory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h"
#include "memory.h"

void play() {
   char a, b;
   bool vis[55]={0};
   map<char,int>m;
   for(int i=1;i<=50;i++)
   {
       a=faceup(i);
       vis[i]=true;
       if(m[a]!=0)
       {
           faceup(m[a]);
       }
   }
}

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

memory.cpp: In function 'void play()':
memory.cpp:7:4: error: 'map' was not declared in this scope
    7 |    map<char,int>m;
      |    ^~~
memory.cpp:7:8: error: expected primary-expression before 'char'
    7 |    map<char,int>m;
      |        ^~~~
memory.cpp:12:11: error: 'm' was not declared in this scope
   12 |        if(m[a]!=0)
      |           ^
memory.cpp:5:12: warning: unused variable 'b' [-Wunused-variable]
    5 |    char a, b;
      |            ^