Problem xmas
User YH
Submission Time 2024-02-11 08:33:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

xmas.cpp: In function ‘int main()’:
xmas.cpp:9:10: error: ‘n’ was not declared in this scope
9 | int map[n];
| ^
xmas.cpp:15:3: error: ‘map’ was not declared in this scope
15 | map[guest-1] = x;
| ^~~
xmas.cpp:2:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
1 | #include <iostream>
+++ |+#include <map>
2 | using namespace std;
xmas.cpp:18:15: error: ‘map’ was not declared in this scope
18 | for (int i : map) {
| ^~~
xmas.cpp:18:15: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?