My program is structured as follows:
Classe.cpp
// Implementing class methods
Classe.hpp
// Class prototypes
Main.cpp
// Main file
In my file Classe.hpp
I have the prototype a friend
function:
friend int mdc(int, int);
The implementation of this function is in Main.hpp
, the question here is: how can I use this function in my file Classe.cpp
?
I tried using the this->
e:
Was not declared in this scope
I searched, but the questions I encountered dealt with other aspects of friend
functions, and I was strongly advised not to implement such a function within my class. How can I accomplish this?