title: Error "no matching function for call to" C++
body: <p>I have been looking around here on stack and references to try to figure this out but after a couple days I am stumped. The program is a simple basketball stats keeper, allowing one to enter in the stats from a basketball game, and then sort and display the stats. I looked around for quite a while but most people were having an issue with this error because they were using base classes (square -> rectangle), which isn't my issue. I'm not very familiar with c++, so I have tried a series of things to get this to work including variations of</p>
  
  <p>[]switching the function parameters from std::vector&amp;, ..*, .. &amp;example, etc..
  []playing around with how I was constructing the menu classes constructor, omiting it completely.</p>
  
  <p>If somebody can give me some insight into what I'm missing here it would be greatly appreciated!</p>
  
  <p>Fair note: This is for school.</p>
  
  <p>In main.cpp:</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include "player.hpp"
  #include "stats.hpp"
  #include "menu.hpp"
  
  int main(int argc, char *argv[]){
  
  Menu menu;
  char inputType;
  std::vector&lt;Player&gt; gameStats;
  inputType = menu.displayWelcomeMenu();
  while(inputType!= 'd' || inputType!= 'k'){
      std::cout &lt;&lt; "oops, wrong input!" &lt;&lt; std::endl;
      menu.displayWelcomeMenu();
      }
  if(inputType='d'){
      std::ifstream fileStream("input.txt");
      Stats::initializeVectorFromFile(&amp;gameStats, &amp;fileStream);
  }
  else{
      Stats::initializeVectorFromUser(&amp;gameStats);
  }
  menu.displayMainMenu(&amp;gameStats);
  
  return 0;
  }
  </code></pre>
  
  <p>In menu.cpp:</p>
  
  <pre><code>#include "player.hpp"
  #include "stats.hpp"
  #include "menu.hpp"
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;iostream&gt;
  
  Menu::Menu(){}
  //functions with matching parameters to menu.hpp.......
  </code></pre>
  
  <p>In menu.hpp:</p>
  
  <pre><code>#ifndef MENU_HPP_
  #define MENU_HPP_
  
  #include "player.hpp"
  #include "stats.hpp"
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;iostream&gt;
  
  class Menu{
  public:
      Menu();
      void handleMenuFlow(std::string, char, std::vector&lt;Player&gt; &amp;);
      char displayWelcomeMenu();
      void displayMainMenu(std::vector&lt;Player&gt; &amp;);
      void displaySortMenu(std::vector&lt;Player&gt; &amp;);
      void displayAvailOptionMenu(std::vector&lt;Player&gt; &amp;);
      char displaySortOptionMenu();
      void displayVectorByName(std::vector&lt;Player&gt; &amp;);
      void displayVectorByInt(std::vector&lt;Player&gt; &amp;, char);
      void displayStats(std::vector&lt;Player&gt; &amp;);
      void displayDoubles(std::vector&lt;Player&gt; &amp;);
      int exitProgram();
  };
  #endif
  </code></pre>
  
  <p>and the error reads:</p>
  
  <pre><code>g++ -c -g -std=c++0x main.cpp
  main.cpp: In function ‘int main(int, char**)’:
  main.cpp:26:33: error: no matching function for call to     
  ‘Menu::displayMainMenu(std::vector&lt;Player&gt;*)’
    menu.displayMainMenu(&amp;gameStats);
                                   ^
  main.cpp:26:33: note: candidate is:
      In file included from main.cpp:7:0:
  menu.hpp:15:7: note: void Menu::displayMainMenu(std::vector&lt;Player&gt;&amp;)
    void displayMainMenu(std::vector&lt;Player&gt; &amp;);
         ^
  menu.hpp:15:7: note:   no known conversion for argument 1 from ‘std::vector&lt;Player&gt;*’ 
  to ‘std::vector&lt;Player&gt;&amp;’
  make: *** [main.o] Error 1
  </code></pre>