crisgoogle said:
"int" is an object type. Any particular int (say, 'x', when defined
int x
is an object. I honestly can't tell from your above statement
whether you get this or not (it's not entirely clear whether, when
you say "an int", you're referring to the built-in _type_ or an
instance _of_ that type).
I think that the problem is that built-in types don't behave like
classes, which makes them not-quite-object-oriented.
OTOH, if you think about built-in types as classes that cannot be
inherited from (like eg. the 'final' classes in Java), they actually
have a surprising amount of class-like behavior: They have "constructors"
and "destructors" (you can actually "construct" and "destruct" an int
with the same syntax you would use with a class, including calling its
default constructor and copy constructor), and many "member" operators
(such as copy assignment and many "operator overloads").5C
The reason for this in C++ is that this way built-in types can be
used in templated code in the same way as most classes, without requiring
special separate syntax (constructing, copying, assigning and destructing
objects of these types can be done with the exact same syntax regardless
of whether they are built-in or class types).
From a syntactic point of view built-in types are actually closer to
classes than one would hastily think. (As said, the major difference is
that built-in types are 'final', iow. cannot be inherited from.)