I want to implement a template like this,
class animal{
}
class beast : public animal {
public:
beast(string name){}
void cry(){
cout<<"kuuuuu"<<endl;
}
}
int main(){
vector<animal*> a;
a.push_back(beast("tiger"))
vector[0].cry();
}
I want to implement similar to it. But my visualstudio cannot find the cry() function.
Please, how can I do it?