제출 #477101

#제출 시각아이디문제언어결과실행 시간메모리
477101glomeMemory (IOI10_memory)C++17
컴파일 에러
0 ms0 KiB
#include "grader.h"
#include "memory.h"
#include<bits/stdc++.h>
using namespace std;
void play() {
  map<char, vector<int>> m;
  char firs;
  for (int i = 2; i<=50; i++) {
    char f = faceup(1), s = faceup(i);
    m[s].push_back(i);
    firs = f;
  }
  for (char i = 'A'; i<='Y'; i++) {
    if(i == first) {
      continue;
    }
    char a = faceup(m[i][0]);
    char b = faceup(m[i][1]);
  }
  return;
}

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

memory.cpp: In function 'void play()':
memory.cpp:14:13: error: 'first' was not declared in this scope; did you mean 'firs'?
   14 |     if(i == first) {
      |             ^~~~~
      |             firs
memory.cpp:17:10: warning: unused variable 'a' [-Wunused-variable]
   17 |     char a = faceup(m[i][0]);
      |          ^
memory.cpp:18:10: warning: unused variable 'b' [-Wunused-variable]
   18 |     char b = faceup(m[i][1]);
      |          ^