1.

Define A Constructor - What It Is And How It Might Be Called (2 Methods).

Answer»

constructor is a MEMBER FUNCTION of the class, with the name of the function being the same as the class name. It ALSO specifies how the object should be initialized.
WAYS of calling constructor:

  1. Implicitly: automatically by complier when an object is created.
  2. Calling the constructors EXPLICITLY is possible, but it makes the code unverifiable.

constructor is a member function of the class, with the name of the function being the same as the class name. It also specifies how the object should be initialized.
Ways of calling constructor:



Discussion

No Comment Found