제출 #1012023

#제출 시각아이디문제언어결과실행 시간메모리
1012023deeraMemory (IOI10_memory)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #include <memory.h> char faceup(int n); vector<int> cards[51]; int play() { for (int i = 1; i <= 50; i++) { cards[faceup(i) - 'A'].push_back(i); } for (auto i: cards) { if (i.size() == 2) { faceup(i[0]); faceup(i[1]); } } }

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

memory.cpp:9:5: error: ambiguating new declaration of 'int play()'
    9 | int play() {
      |     ^~~~
In file included from memory.cpp:4:
memory.h:1:6: note: old declaration 'void play()'
    1 | void play();
      |      ^~~~
memory.cpp: In function 'int play()':
memory.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^