Well, that's true. But then what was the need of introducing a class
when a struct was already there? I mean that when C++ was designed,
Stroustrup may have thought of it. But "as a beginner" i still wonder
why a class was incorporated , even though struct was already there
"doing the work".
I'd guess the idea was that by making the default access modifier
private it would encourage information hiding and encapsulation. Of
course to maintain backwards compatibility with C you can't just change
the default with structs, otherwise everything would break, hence the
need for a new keyword. Additionally I'd argue that it serves to
encourage developers moving from C to C++ to think about things in a
different frame of mind and to use the new features of the OO paradigm
that C++ makes available.
That's just my view though, and I'm sure someone out there has more
historical knowledge on this one..
Alan