제출 #495431

#제출 시각아이디문제언어결과실행 시간메모리
495431blueCats or Dogs (JOI18_catdog)C++17
컴파일 에러
0 ms0 KiB
#include <iostream> using namespace std; int main() { int a = 5; cout << sizeof(a) << '\n'; int* b = &a; cout << sizeof(b) << '\n'; if(a != b) while(1); }

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

catdog.cpp: In function 'int main()':
catdog.cpp:12:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if(a != b) while(1);
      |        ~~^~~~