I am trying to understand the usage of smart pointers. In the below example, I intend Class B to be the smart pointer to class A. I get the following linker error
error LNK2019: unresolved external symbol "public: __thiscall ClassB::ClassB(classA *)"
I seem to be missing something with the constructor. I am not clear as to what should be passed from class A in the constructor. I would appreciate if somebody could explain.
class A
{
friend class B;
virtual methods ();
protected:
virtual ~A();
}
class B:public QSharedPointer<A>
{
B();
B(A * pData);
B(const B &data);
virtual ~ B();
}
Bbut the linker error referencesClassB, which seems very strange.