title: C++ Visual Studio overloaded function error: no instance of overloaded function matches the specified type
body: <p>CLARIFICATION:</p>
  
  <p>This project is being done in Visual Studio, with an stdafx.h file used.</p>
  
  <p>FText is an alias for string, as established in the file stdafx.h:</p>
  
  <pre><code>#include &lt;string&gt;
  
  using FText = std::string;
  using int32 = int;
  </code></pre>
  
  <p>stdafx.h is included in the View.cpp class.</p>
  
  <p>ORIGINAL QUESTION:</p>
  
  <p>So, I am trying to create several print methods which print a string based on one or two parameters: a number parameter that indicates which message to print, and an input to be used in the message. As of now, I have three instances of the method "print", as shown below:</p>
  
  <pre><code>///A method that prints a message
  //give it a number to tell it what message to print.
  void Display::print(int message)
  {
  
      switch (message)
      {
          case 0:
              std::cout &lt;&lt; "Welcome to Cows and Bulls, a simple word-guessing game. \n";
  
              break;
          case 1:
              //(I omitted most of the messages to save space)
              break;
          default:
              std::cout &lt;&lt; "Something has gone horribly wrong. \n";
              std::cout &lt;&lt; "Goodbye. \n";
              throw std::exception();
      }
  
  
  }
  
  //messages with one int parameter
  void Display::print(int message, int param)
  {
  
      switch (message)
      {
          case 0:
  
              break;
          default:
              std::cout &lt;&lt; "Something has gone horribly wrong. \n";
              std::cout &lt;&lt; "Goodbye. \n";
              throw std::exception();
      }
  
  }
  
  //messages with one string parameter
  void Display::print(int message, FText param)
  {
  
      switch (message)
      {
      case 0:
  
          break;
      default:
          std::cout &lt;&lt; "Something has gone horribly wrong. \n";
          std::cout &lt;&lt; "Goodbye. \n";
          throw std::exception();
      }
  
  }
  </code></pre>
  
  <p>I haven't added any messages to the second and third overload yet, but I'll get to that.</p>
  
  <p>The class declaration in the header file for the view part of the program looks like this:</p>
  
  <pre><code>#pragma once
  
  //The method that prints thing to the screen
  
  
  
  class Display
  {
  
      public:
  
          void print(int message);
  
          //print a message with a parameter other than the message being selected
  
          void print(int message, int param);
  
          void print(int message, FText param);
  
  };
  </code></pre>
  
  <p>The first two instances of the print method work fine, but the third one (the one with a string/FText as a parameter) is giving me the following error:</p>
  
  <pre><code>"no instance of overloaded function "CowsAndBulls::Display::print" matches the specified type"
  </code></pre>
  
  <p>To add a little extra clarity, the code still compiles, and I have not used this function yet: I'm getting an error in the definition of this version of print.</p>
  
  <p>I'm fairly certain I'm just missing something simple, but a quick search through stack overflow's questions has failed to bring me another problem with exactly the same circumstances as this (or perhaps I just failed to recognize another post as the same problem?)</p>
  
  <p>either way, any assistance is appreciated.</p>