In the header, I’m defining bool isActive. In classes derived from this one, I would like to make isActive false by default. I tried doing this by adding
AbstractClass::isActive = false;
to the cpp file, but that causes the error “Expected constructor, destructor, or type conversion before ‘=’ token.”
Initialize it in the class’ constructor:
That the class contains abstract methods doesn’t stop it from having a constructor that is used to initialize its member variables.