I used to be good in these but for anymore. I have following code:
class A {
public:
A(){}
void show(){
cout << test << endl;
}
};
class B: public A {
public:
B(){}
void myFunc(){
show();
Other code...
}
};
Inside main:
B b;
b.myFunc();
I am getting ‘undefined reference to Show()’. Am I doing anything wrong. Public function in my base class should be accessible in my derived class. Right?
Also I am getting 'undefined reference to A:A()' as well. I am getting too old for C++.