C++ undefined reference
- by klaus-johan
Hi ,
My problem is the following :
I have a class A that inherits from an abstract base class. I override all the virtual functions from the base class, and I have a constructor like this :
A::A(B* b)
{
this->b=b;
}
In the constructor of class B , I have the following piece of code:
A* a=new A(this)
However this line of code gives the error : undefined reference to 'A::A(B*)'
I have absolutly no idea why could this be happening , so any suggestion would be greatly appreciated !