제출 #717858

#제출 시각아이디문제언어결과실행 시간메모리
717858EntityPlantt짝수 정렬 (tutorial3)C++14
컴파일 에러
0 ms0 KiB
#include <algorithm>
void sort_even(int n, int a[]) {
  std::sort(a, a + n);
  for (int i = 0; i < n; i++) if (!(a[i] & 1)) Report(a[i]);
}

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

tutorial3.cpp: In function 'void sort_even(int, int*)':
tutorial3.cpp:4:48: error: 'Report' was not declared in this scope
    4 |   for (int i = 0; i < n; i++) if (!(a[i] & 1)) Report(a[i]);
      |                                                ^~~~~~