No matter how many times you repeat it, your code makes no sense, therefore your question makes no sense. Look at what I posted earlier. If that's now what you're trying to do, explain using words, not code, exactly what you're trying to do.
It depends upon what you want to achieve! You're trying to jump ahead and attempting to do things without having the basic underlying knowledge. You need to acquire the basic knowledge of c++ so that you would know whether you need virtual functions or derived classes or pure virtual etc. Learn the basics of the c++ language (including classes) before you try to do to much.
All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.