Using an object
Any of the class public methods can be called on an object of that class.
Any of the class public methods can be called on an object of that
class.
The following example creates object obj and then calls
method doSomething on it:
ClassY obj("TEMP1234");
obj.doSomething();Alternatively, you can do this using dynamic object creation:
ClassY* pObj = new ClassY("parameter1");
pObj->doSomething();