title: Function/Method pointers Pushed to a Deque
body: <p>I am making a Queue for running functions. I put the functions that require being called into a <code>std::deque&lt;bool(*)()&gt;</code> Then I later on cycle through the deque calling each function and letting it run, sometimes even doing things based on the return.</p>
  
  <p>The problem I am having is actually with regards to placing these functions inside of the deque.</p>
  
  <p>I have this deque inside a class called <code>A2_Game</code>. I also have a class called <code>Button</code>.</p>
  
  <p>My code resembles the following:</p>
  
  <pre><code>class Button
  {
      bool DoInput();
  }
  
  class A2_Game
  {
      std::deque&lt;bool(*)()&gt; Input_Functions;
      bool EnterName()
  }
  
  A2_Game::OtherMethod()
  {
      Button* btn1 = new Button();
      Input_Functions.push_back(&amp;A2_Game::EnterName); //The compiler told me to do this and it still won't compile the line..
      Input_Functions.push_back(btn1-&gt;DoInput);
  
      //Loop
  }
  </code></pre>
  
  <p>I cannot determine how to fix my compile errors. I suspect some of you may be able to just tell me outright what needs to be changed/done in order to get this to compile, by looking at what I've shown here. In case that is !true then here are the compile errors.</p>
  
  <p><code>error C2664: 'std::deque&lt;_Ty&gt;::push_back' : cannot convert parameter 1 from 'bool (__thiscall A2_Game::* )(void)' to 'bool (__cdecl *const &amp;)(void)'</code></p>
  
  <p><code>error C3867: 'Button::Doinput': function call missing argument list; use '&amp;Button::Doinput' to create a pointer to member</code></p>