제출 #1317365

#제출 시각아이디문제언어결과실행 시간메모리
1317365matrix081Memory (IOI10_memory)C++20
컴파일 에러
0 ms0 KiB
#include "grader.h"
#include "memory.h"
#include <vector>
using namespace std;

void play() {
   int i,j, candies=0;
   char a, b;
   vector <int> guessed;
   for (i=0; i<50; i++) {
      for (j=i+1;j<50;j++){
         if(candies==25){
            break;
         }
         a = faceup(i);
         b = faceup(j);
         cout<< a<<" " << b;
         if(a==b){
            candies+=1;
         }
         else{
            continue;
         }
        
      }
   }
}

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

memory.cpp: In function 'void play()':
memory.cpp:17:10: error: 'cout' was not declared in this scope
   17 |          cout<< a<<" " << b;
      |          ^~~~
memory.cpp:4:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
    3 | #include <vector>
  +++ |+#include <iostream>
    4 | using namespace std;