Class: Instantiating a Class
Instantiating a Class
- The new operator instantiates a class by allocating memory for a new object and returning a reference to that memory. The new operator also invokes the object constructor.
- The new operator requires a single, postfix argument: a call to a constructor. The name of the constructor provides the name of the class to instantiate.
- The new operator returns a reference to the object it created.
Semantic portal