c++ friend function - operator overloading istream >>
My question is in regards to friend functions as well as overloading the << and >>. From my understanding I thought friend functions could (and should) access private member variables directly. However in the case I have here the compiler would only accept my .cxx file when I used "get" functions to obtain each private variable. Here is my header file class BigNum public: // CONSTRUCTORS and DESTRUCTORS BigNum(); BigNum(int num, size_t optional_base = 10); BigNum(const char strin[], size_t optional_base = 10); // MEMBER FUNCTIONS size_t get_digit(size_t index) const; size_t get_used() const;