class A{};
class B
{
private:
A *pa;
}'
class C
{
private:
B *pb;
public:
operator A*
{
return pb->pa;
}
};
请问一下,对operator A*
{
return pb->pa;
}的重载用什么意义,然后情况下会使用到对A类的重载?
class A{};
class B
{
private:
A *pa;
}'
class C
{
private:
B *pb;
public:
operator A*
{
return pb->pa;
}
};
请问一下,对operator A*
{
return pb->pa;
}的重载用什么意义,然后情况下会使用到对A类的重载?