[Solved] C++ , variables , abstract/ virtual class

A few things. First name your functions sensible things, those names are gibberish and mean nothing to anyone on here. Second, you’re error is quite simple. The “Wolf” and “Animal” class do not need to re-declare “inicjatywa,” so long as they declare their inheritance of “Organizmy” to be public (as they have) the ‘outside world’ … Read more

[Solved] how to make an instance of a subclass of type base class C#

When an instance of Motorcycle is seen as as Vehicle, then it, quite naturally, cannot give you access to Motorcycle‘s unique properties. That’s the point of inheritance. To access them, you have to type-cast the instance: Vehicle v = new Motorcycle(); ((Motorcycle)v).MotorbikeEngineVolume = 250; When you cannot be sure the instance truly is a Motorcycle, … Read more