제출 #1282024

#제출 시각아이디문제언어결과실행 시간메모리
1282024ojiif-else 문 1 (BSC_0_8)C++20
컴파일 에러
0 ms0 KiB
#incldue<iostream>

int main(){
    int a;
  std::cin >> a;
  if(a)std::cout << "non";
  std::cout << "zero\n";
}

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

if1.cpp:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<iostream>
      |  ^~~~~~~
      |  include
if1.cpp: In function 'int main()':
if1.cpp:5:8: error: 'cin' is not a member of 'std'
    5 |   std::cin >> a;
      |        ^~~
if1.cpp:1:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
  +++ |+#include <iostream>
    1 | #incldue<iostream>
if1.cpp:6:13: error: 'cout' is not a member of 'std'
    6 |   if(a)std::cout << "non";
      |             ^~~~
if1.cpp:6:13: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
if1.cpp:7:8: error: 'cout' is not a member of 'std'
    7 |   std::cout << "zero\n";
      |        ^~~~
if1.cpp:7:8: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?