title: Create a 'Call Function' Table with Different Members
body: <p>I'm trying to create a table that will call a general function from a general member. I'm trying to make a table of hotkeys, so when it identifies a certain key is pressed it will call the specific function on the specific object.</p>
  
  <p>I have created an object (hotKeyCommand) that stores a pointer to a void function, and a template to the pointer of the object to call the function from. Then I have a map that looks like this:</p>
  
  <pre><code>//hotKeyCommand.cpp
  template&lt;class callObjectPointer&gt; class hotKeyCommand
  {
  ...
  typedef void(*hotKeyFunc)();
  hotKeyFunc commandFunction;
  callObjectPointer objectToCall;
  
  //hotKeyConfig.cpp
  std::map&lt;unsigned int, hotKeyCommand&gt; hotKeyList;
  </code></pre>
  
  <p>I'm wondering how to interface with the hotKeyList variable to do this. Ideally I could just call hotKeyList[someID].execute() and it would execute the function to the appropriate object, but I run into lots of syntax errors based on not giving hotKeyList a template of which objects to use.</p>
  
  <p>Any help would be appreciated!
  Thanks!</p>