Hi,
I have a function getA()
with following signature :
class A {
public:
typedef std::tr1::shared_ptr <A> Ptr;
//other member functions....
};
class B {
pubic:
A::Ptr getA();
};
And, I want to return an empty pointer in getA()
in same case; Also, as a user of Class B
, I need to test if the return value of getA()
is null before using it . How should I do it?