Problem countalp
User Nigelee77
Submission Time 2023-10-23 15:24:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

countalp.cpp: In function ‘int main()’:
countalp.cpp:12:2: error: ‘map’ was not declared in this scope
12 | map<char, int> alphabet;
| ^~~
countalp.cpp:2:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
1 | #include <iostream>
+++ |+#include <map>
2 |
countalp.cpp:12:6: error: expected primary-expression before ‘char’
12 | map<char, int> alphabet;
| ^~~~
countalp.cpp:17:3: error: ‘alphabet’ was not declared in this scope
17 | alphabet[a]++;
| ^~~~~~~~
countalp.cpp:22:34: error: ‘alphabet’ was not declared in this scope; did you mean ‘alphabets’?
22 | cout << alphabets[i] << " " << alphabet[alphabets[i]] << endl;
| ^~~~~~~~
| alphabets