Next:
Referring to the current
Up:
Basic class semantics
Previous:
The class concept
Contents
Objects of a class
An
object
is a piece of data having a class data type
A class is declared, an object is defined
In a program there can only be one class with a given name, but several objects of the same class
Example:
TimeStamp theTimeStamp; // declare an object
theTimeStamp.update(); // call some methods
long theTime = theTimeStamp.get();
std::cout « theTime « std::endl;
Leo Liberti 2008-01-12