For Advanced Readers
1. The concept of default constructor in C++ and Java is same. The only difference is that when the default constructor is supplied by the system, it does not initialize the variables in a C++ program. In Java, system supplied constructor initializes variables to null values.
2. If we write a code like :Date d2() ;
it does not create an object. It is a very general declaration of a function named d2! This function is not having any parameters. Its return type is Date!
3. For constructing an array of objects, the data for construction should in general come from a file.
4. For objects having pointers as data members, one should not depend on default copy constructor. The pointers in the new object may be pointing to memory ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access