From: Robert Fortune (catlike1_at_earthlink.net)
Date: Thu, 06 Nov 2003 10:23:21 GMT
"Robert Fortune" <firstname.lastname@example.org> wrote in message
> > Is an object a class and a class an object?
Mike Wahler" <email@example.com> wrote in message
> A 'class' defines a data type. An object is
> an instance of a type.
> int i; /* defines an instance (an object) of type 'int', named 'i' */
> class X /* defines the type 'X' */
> int member;
> X obj; /* defines an instance (an object) of type 'X', named 'obj'
> What C++ book(s) are you reading?
Thanks again everyone for your answers. You make this
Sams Teach Yourself C++ Programming in 21 days by
Jesse Liberty. I like this book. It's helping me get my foot
in the door. Aside from this it's really a good book.
"A Class is just a collection of variables -- often of different types --
combined with a set of related functions."
Ok. I follow that. (and old QB programmer here)
"A Class enables you to encapsulate, or bundle, these
various parts and various functions into one collection, which is called an
He seems to be saying that a collection of data members
and related functions is an object as well as a class.