I've been working on a practice program (C++) involving operator overloading and friend functions - one of these friend functions (ostream& operator<<(ostream &out, const rational &robj)) accesses (or is supposed to access) a private member function GCD() within a class 'rational'. Defining the GCD() function turned out alright, but it is the aforementioned friend function that is giving me a problem, as when I refer to GCD() my IDE labels it as an error, saying the private function is unidentified. I would assume that it is a matter of placement of the function headers and such, but this has left me absolutely boggled. Below is the link to my code:
Any help is extremely welcome! Thank you all so much! :)