Saved Bookmarks
| 1. |
What is a constructor? Give the rules of writing a constructor function. |
|
Answer» Constructor is a special member function that is used to initialize the data members of an object. The rules for writing a constructor function are:
An object of a class with a constructor cannot be used as a member of a union. |
|