I know there are many linkage error questions similar to mine, but I haven't been able to fix it with any of the responses. I've made sure to add the correct scope resolution operators and give my constructors and destructors bodies, but the error is still there. Can anyone give me a hint besides "this has already been answered"?
Xx.obj : error LNK2019: unresolved external symbol "public: __thiscall Y::Y(void)" (??0Yy@@QAE@XZ) referenced in function _main
This is the relevant code:
#include <iostream>
class Xx
{
X::X() {};
X::~X() {};
};
class Y : public X
{
public: //added public
Y::Y();
Y::~Y();
};
int main()
{
X *x = new Y;
Y *y = new Y; //turned new Y to new X
delete &x; //added deletes
delete &y; //added deletes
return 0;
}