why i am facing this error in my code ? again and again ! how can i get rid of this?
Error1 error LNK2019: unresolved external symbol "public: __thiscall C::C(void)" (??0C@@QAE@XZ) referenced in function _main C:\Users\corleone\Documents\Visual Studio 2010\Projects\Practice\Practice\p1.obj Practice
Error2 error LNK1120: 1 unresolved externals C:\Users\corleone\Documents\Visual Studio 2010\Projects\Practice\Debug\Practice.exe Practice
#include<iostream>
usingnamespace std;
class A
{
private :
int a1;
public:
A();
void g()
{cout<<"A"<<endl;}
};
class B
{
private:
int b1;
public:
B();
void g()
{cout<<"B"<<endl;}
};
class C:public B
{
private:
int c1;
public:
C();
void g()
{cout<<"C"<<endl;}
};
int main()
{
C c;
B * p = &c;
p->g();
return 0;
}