실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:10:5: error: ‘stack’ was not declared in this scope 10 | stack<int> s; | ^~~~~ Main.cpp:2:1: note: ‘std::stack’ is defined in header ‘<stack>’; did you forget to ‘#include <stack>’? 1 | #include <iostream> +++ |+#include <stack> 2 | #include <string> Main.cpp:10:11: error: expected primary-expression before ‘int’ 10 | stack<int> s; | ^~~ Main.cpp:19:13: error: ‘s’ was not declared in this scope 19 | s.push(num); | ^ Main.cpp:21:16: error: ‘s’ was not declared in this scope 21 | if(s.empty()){ | ^ Main.cpp:28:21: error: ‘s’ was not declared in this scope 28 | cout << s.size() << '\n'; | ^ Main.cpp:30:16: error: ‘s’ was not declared in this scope 30 | if(s.empty()){ | ^ Main.cpp:36:21: error: ‘s’ was not declared in this scope 36 | cout << s.top(); | ^
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.