Reputation: 31
class class_B
{
class_A* A;
.
.
.
class_A& func() { return *A; }
class_A func() const { return *A; }
ostream& operator <<(ostream& os, const class_B& obj)
{
os << obj.func();
return os;
}
this give me an error but i don't understand why.
Do I have to implement class_A's copy/move constructor/operator?
Upvotes: 0
Views: 43