How do I return a point object aggregated in a another class? I’m trying to return a point object that’s a private member of the quad class. I have written the function and it compiles, but I don’t know the correct syntax to call that function.
Point Quad::getA()
{
return Point a;
}
void Quad::check()
{
cout << this->getA(); //will not work
}
This will work: