I encountered a problem when tried compiling the following code:
#include #include #include #include
When you declare a variable in global scope, you may only do initialization. E.g,
int a = 0;
You cannot do normal statements like:
a = 9;
So I would fix the code with:
#include #include #include #include #include using namespace std; map mapDial; int main() { mapDial['A'] = 2; cout << mapDial['A'] << endl; return 0; }