Possible Duplicate:
What are the differences between struct and class in C++
http://www.cplusplus.com/reference/std/typeinfo/type_info/
I guess my "teacher" didn't tell me a lot about the differences between struct and classes in C++.
I read in some other question that concerning inheritance, struct are public by default... I also guess struct doesn't have constructors/destructors...
What are the other differences then ? Do they matter that much ?
And when speaking about private/protected attributes/methods, they aren't accessible at runtime, only because the compiler tells it so at compile time and reports an error, right ? Then comparing those features with classes, what does "information hiding" really bring to the programmer ? Is it here so that when somebody reuse the class, this person won't misuse the class because the private/protected stuff will be reported by the compiler ?
I still struggle with the real purpose of information hiding, it still want to sound in my head like it brings more security in programs, meaning less security breaches, but I'm really confused about the goal of such design in the language... (And I Don't intend to be against C++ in any way, I just to understand in what cases this feature can be interesting or not; if not, that's not a problem, but I just like to know...).