C++ Structures and Classes - Explain the difference between structures and classes.
Explain the difference between structures and classes.Structure | Class | It is a value type. | It is a reference type. | Its object is created on the stack memory. | Its object is created on the heap memory. | It does not support inheritance. | It supports inheritance. | The member variable of structure cannot be initialized directly. | The member variable of class can be initialized directly. | It can have only parameterized constructor. | It can have all the types of constructor and destructor. |
|