I am trying to make a map that takes a string and links it to a function.
so what I did:
Code:
map<string,int> Index;
But how can I add a function that returns an int?
I tried:
Code:
Index["quit"] = quit();
But that won't work.
Is it possible to link a string to a function with the STL map?
And if so, how?