title: Can't call function from public class in main ... "new types may not be defined in a return type"
body: <p>I am trying to call a void function inside a public class, but I get errors I do not understand:</p>
  
  <pre><code>#include &lt;iostream&gt;
  class Buttons
  {
      public:
          Buttons()
          {
              short pushl;
              short *tail;
              cout &lt;&lt; "Wally Weasel" &lt;&lt; "/t";
              void init_sub(int x, int y);
          };
          ~Buttons()
          {
              cout &lt;&lt; "Buttons has been destroyed!";
          };
  }
  int main(int args, char**LOC[])
  {
      int z, a;
      Buttons::init_sub(z, a);
      return 2;
  }
  Buttons::void init_sub(int x, int y)
  {
      cout &lt;&lt; &amp;x &lt;&lt; &amp;y;
  }
  </code></pre>
  
  <p>NEWLY UPDATED CODE (STILL DOESN'T WORK):</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class Buttons
  {
    public:
    Buttons()
    {
      short pushl;  // unused variable in Constructor: should be a member variable?
      short *tail;  // same
      cout &lt;&lt; "Wally Weasel" &lt;&lt; "/t";
    };
  
    ~Buttons()
    {
      cout &lt;&lt; "Buttons has been destroyed!";
    }
  
   void init_sub(int z, int a);
  };
  
  
  int main(int args, char **LOC[])
  {
      int z = 0;
      int a = 1;
      Buttons::init_sub(z, a);
      return 2;
  }
  
  void Buttons::init_sub(int x, int y)
  {
      cout &lt;&lt; &amp;x &lt;&lt; " " &lt;&lt; &amp;y;
  }
  </code></pre>
  
  <p>Why can't I call the function?</p>
  
  <p>Original error persisting: "new types may not be defined in a return type"</p>
  
  <p>PS: I updated my code to match the present state of my situation - still the same error though.
   I have been struggling to no end with C++ - I am used to lower-level programming without so many semantics involved of syntax/structuring.</p>