Code:I have class C{
...
C& operator<<(C& os, const char* str) {
...
}
void display() {
Is there anyway I can call operator<< in here?
}
Code:I have class C{
...
C& operator<<(C& os, const char* str) {
...
}
void display() {
Is there anyway I can call operator<< in here?
}
*this
If you don't actually need to directly access any private member variables, then make that member function into a non-member non-friend function.
thank you