Trying to define a function, but I get "variable or field `function_A' declared void"
<pre><code>#include &lt;cstdio&gt;
#include &lt;cstdlib&gt;
#include &lt;iostream&gt;

using namespace std;

class Student;
void function_A(Student&amp; s)

class Student { 
   void function_B() {
        ::function_A(*this);
   }
   int courses;
};

void function_A(Student&amp; s)
{ // line 18 (where error is occurring)
     s.courses = 1;
}

int main()
{
    Student s;
    s.function_B();
    return 0;
}
</code></pre>

<p>The error that I am getting is as follows:</p>

<blockquote>
  <p>(line 18) New types may not be defined in a return type.</p>
</blockquote>
