0

Say I have a class Student, and I have already declared a non-member function called "function_A" that takes in as an argument, type Student.

Now say INSIDE the Student class, I had a member function, and in it, I wanted to reference the non-member function, "function_A", declared earlier. What would I pass in as the argument (the argument itself must be type Student).

code

Community
  • 1
  • 1

1 Answers1

3

Do you mean something like this?

void function_A(Student s);

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

if the member function's name is different than function_A, I can't see any problem.

Simone
  • 10,912
  • 1
  • 26
  • 39