Problem labs
User Rayblazer29
Submission Time 2025-06-18 17:17:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

labs.cpp: In function ‘int main()’:
labs.cpp:4:2: error: ‘map’ was not declared in this scope
4 | map<string, int> names;
| ^~~
labs.cpp:1:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
+++ |+#include <map>
1 | using namespace std;
labs.cpp:4:6: error: ‘string’ was not declared in this scope
4 | map<string, int> names;
| ^~~~~~
labs.cpp:1:1: note: ‘std::string’ is defined in header ‘<string>’; did you forget to ‘#include <string>’?
+++ |+#include <string>
1 | using namespace std;
labs.cpp:4:14: error: expected primary-expression before ‘int’
4 | map<string, int> names;
| ^~~
labs.cpp:5:8: error: expected ‘;’ before ‘s’
5 | string s;
| ^~
| ;
labs.cpp:6:2: error: ‘cin’ was not declared in this scope
6 | cin >> q;
| ^~~<