Dear C++'ers
I am experimenting with boost shared_pointers.
My Classes
class A
{
private:
typedef boost::shared_ptr<AASharedPtr;
ASharedPtr m_parent; // Keep Track of Parent Node
float m_score; // Total Distance
public:
A(float p_score, ASharedPtr p_ptr ): m_parent(p_ptr)
{
m_score = p_score;
}
};
If i say
ASharedPtr a(new Node(ay, p_ptr));
// where p_ptr already initialzed shared ptr things are quite O.K
but
ASharedPtr a(new Node(ay, 0)); // is not working
Now my question is how to set m_parent to be NULL or 0. I am on VC++
6.0 debugger. It shows m_parent as CXX0030: Error: expression cannot be
evaluated.
I hope I am clear.
Thanking you