title: Receiving error variable has incomplete type "void"
body: <p>I'm coding a basic C++ program to calculate the length and slope of a line. The user enters a set of x and y coordinate points and the program then displays a menu asking the user if he/she would like to calculate only the slope, only the length, or both the slope and the length. However, I'm getting an error on my void Menu function that states that the variable has an incomplete type "void". My code as it stands now is below.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cmath&gt;
  
  void Menu (int&amp; MenuNum);
  void CalculateSlope (int&amp; X1, int&amp; X2, int&amp; Y1, int&amp; Y2);
  void CalculateLength (int&amp; X1, int&amp; X2, int&amp; Y1, int&amp; Y2);
  
  using namespace std;
  
  int main(int argc, const char * argv[])
  {
  
      int X1;
      int X2;
      int Y1;
      int Y2;
      int MenuNum;
      //Ask User for Points
  
      cout &lt;&lt; "Enter points (X1,Y1) and (X2,Y2) for the line." &lt;&lt; endl;
      cout &lt;&lt; " " &lt;&lt; endl;
      cout &lt;&lt; "X1:" &lt;&lt; endl;
      cin &gt;&gt; X1;
      cout &lt;&lt; "Y1:" &lt;&lt; endl;
      cin &gt;&gt; Y1;
      cout &lt;&lt; "X2:" &lt;&lt; endl;
      cin &gt;&gt; X2;
      cout &lt;&lt; "Y2:" &lt;&lt; endl;
      cin &gt;&gt; Y2;
  
      cout &lt;&lt; "Points entered are" 
           &lt;&lt; " : " &lt;&lt; X1 &lt;&lt; "," 
           &lt;&lt; Y1 &lt;&lt; " and " 
           &lt;&lt; X2 &lt;&lt; "," &lt;&lt; Y2 &lt;&lt; endl;
      cout &lt;&lt; "                  "&lt;&lt; endl;
  
      //Menu
  
      void Menu (MenuNum);
      {
          cout &lt;&lt; "To calculate the slope of the line, enter 1 " &lt;&lt; endl;
          cout &lt;&lt; "To calculate the length of the line, enter 2" &lt;&lt; endl;
          cout &lt;&lt; "To calculate the length and slope of the line, enter 3" &lt;&lt; endl;
          cin &gt;&gt; MenuNum;
  
      }
  </code></pre>
  
  <p>Also, if you could give some guidance on how to call the slope and length calculating functions from the Menu function, that would be great.</p>
  
  <p>Thanks!</p>