I'm taking ANOTHER c++ course required for my degree in computer programming at my local community college, we are currently studying classes, I am not actually sure I understand the purpose of a class, since there ARE things like structs within the language.
Example, the definition of a struct is a collection of a fixed number of components in which the components are accessed by name, they MAY be of different types
Class- A collection of a fixed number of components. The components of a class are called members of the class.
This book even says that the ONLY difference between a struct and a class is the fact that by default all members of a struct are public, and all members of a class are private.
I do realize that within a class (not sure about struct) you are able to change the member access specifier...anyway...the question really is WHY are there classes if there are structs, am I just not getting the point yet?
2006-09-16
07:53:31
·
4 answers
·
asked by
D
4