Hello, let's say I have an abstract class with a few pure abstract functions and a few classes that derive from it, and all of the data from these classes eventually becomes similar, I was wondering if it would be wise, or even possible, to declare a vector under protected in the abstract class to collect the data so something like that.
vector <string> str;
virtual function x();
virtual function y(); //etc etc
class B : public A
class C: public A
//similar to class B
I'm having trouble understanding how pure virtual functions operate in C++; I understand polymorphism because I've done a lot of java projects with it.
Is it even feasible to define and utilise that vector in C++ because abstract classes cannot be instantiated?