I have a base class, say BassClass, with some fields, which I made them protected, and some pure virtual functions. Then the derived class, say DerivedCla
BassClass
DerivedCla
This works:
#include struct Base { virtual void print () const = 0; protected: int val; }; struct Derived : Base { void print () { std::cout << "Bases's val: " << val << std::endl; } };