#include <iostream>
#include <map>
using std::cout;
using std::endl;
using std::map;
class Test {
private:
const int key;
public:
typedef map<int, char> TMap;
static TMap mp;
Test(const int k) : key(k) { };
char get_char() { return mp[key]; };
};
Test::TMap Test::mp = { {1, 'a'}, {2, 'b'}, {3, 'c'} };
int main()
{
Test o(2);
cout << o.get_char() << endl;
return 0;
}
/*
run:
b
*/