title: C++ "No suitable constructor exists to convert from <default constructor> to parameterized constructor
body: <p>I'm sorry for asking this, as it's probably answered somewhere on here, but my searches so far have been fruitless.</p>
  
  <p>If I use my parameterized constructor, I can pass my class object to my output function and all is well.  If I use the default constructor, it fails with:</p>
  
  <pre><code>1&gt;c:\&lt;path&gt;\project_04.cpp(152): error C2664: 'printCheck' : cannot convert parameter 1 from 'AdamsEmployee (__cdecl *)(void)' to 'AdamsEmployee'
  1&gt;          No constructor could take the source type, or constructor overload resolution was ambiguous
  </code></pre>
  
  <p>The mouse-over for my object when I try to pass it to the output function says:</p>
  
  <pre><code>Error: No suitable constructor exists to convert from "AdamsEmployee ()" to "AdamsEmployee"
  </code></pre>
  
  <p>Here is my default constructor:</p>
  
  <pre><code>AdamsEmployee::AdamsEmployee()
  {
      AdamsEmployee::employeeNumber = -1;
      AdamsEmployee::employeeName = "";
      AdamsEmployee::employeeAddress = "";
      AdamsEmployee::employeePhone = "";
      AdamsEmployee::employeeHourlyWage = 0.0;
      AdamsEmployee::employeeHoursWorked = 0.0;
  }
  </code></pre>
  
  <p>Here is my parameterized constructor:</p>
  
  <pre><code>AdamsEmployee::AdamsEmployee(int employeeNumber, string employeeName, string
  employeeAddress, string employeePhone, double employeeHourlyWage,
  doubleemployeeHoursWorked )
  {
      AdamsEmployee::employeeNumber = employeeNumber;
      AdamsEmployee::employeeName = employeeName;
      AdamsEmployee::employeeAddress = employeeAddress;
      AdamsEmployee::employeePhone = employeePhone;
      AdamsEmployee::employeeHourlyWage = employeeHourlyWage;
      AdamsEmployee::employeeHoursWorked = employeeHoursWorked;
  }
  </code></pre>
  
  <p>The line that calls the output:</p>
  
  <pre><code>printCheck( emp1 );
  </code></pre>
  
  <p>The output function:</p>
  
  <pre><code>void printCheck( AdamsEmployee employee )
  {
  // Display the mock paycheck.
  cout &lt;&lt; "----------------------------------H&amp;H Systems----------------------------------" &lt;&lt; endl;
  cout &lt;&lt; "\nPay to the order of " &lt;&lt; employee.getName() &lt;&lt; ".....$" &lt;&lt; employee.calcPay() &lt;&lt; endl;
  // Display the simulated paystub.
  cout &lt;&lt; "\nGoliath National Bank" &lt;&lt; endl;
  cout &lt;&lt; "-------------------------------------------------------------------------------" &lt;&lt; endl;
  cout &lt;&lt; "Hours worked: " &lt;&lt; employee.getHoursWorked() &lt;&lt; endl;
  cout &lt;&lt; "Hourly wage: " &lt;&lt; employee.getWage() &lt;&lt; endl;
  } // End printCheck()
  </code></pre>
  
  <p>If I add parameters, everything works.  Searches return a lot of situations that do not seem to apply.  Do you need any more information?</p>
  
  <p>What am I doing wrong?</p>
  
  <p>Edit: Thanks for all the help!</p>