Problem contestcalc
User StormyGood
Submission Time 2024-03-15 18:28:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

contestcalc.cpp: In function ‘int main()’:
contestcalc.cpp:9:5: error: ‘map’ was not declared in this scope
9 | map<string, int> scores;
| ^~~
contestcalc.cpp:3:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
2 | #include <unordered_map>
+++ |+#include <map>
3 | using namespace std;
contestcalc.cpp:9:15: error: expected primary-expression before ‘,’ token
9 | map<string, int> scores;
| ^
contestcalc.cpp:9:17: error: expected primary-expression before ‘int’
9 | map<string, int> scores;
| ^~~
contestcalc.cpp:16:9: error: ‘scores’ was not declared in this scope; did you mean ‘score’?
16 | scores[name] = score;
| ^~~~~~
| score
contestcalc.cpp:27:23: error: ‘scores’ was not declared in this scope
27 | totalScore += scores