The other topic and responses there made me ask this question:
Why does C++ allow struct
to behave just like class
? At one hand, C++ made it compatible with C-struct
by making it's members public by default (just like in C), while on the other hand, it made it look-like class by allowing it to be inherited from classes, and applying other object-oriented techniques (not so much like C-struct
anymore). Why did it not make it just plain old C-struct
with no OOP? Any special reason?