#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
class Student;
void function_A(Student& s)
class Student {
void function_B() {
::function_A(*this);
}
int courses;
};
void function_A(Student& s)
{ // line 18 (where error is occurring)
s.courses = 1;
}
int main()
{
Student s;
s.function_B();
return 0;
}
The error that I am getting is as follows:
(line 18) New types may not be defined in a return type.