04-29-2011, 08:05 AM
Difference between constructor and destructor is given in table form:
Constructor Destructor
Same name as class name Same name as class name but preceded by tilde (~) sign
Used for memory allocation/ initialization Used for memory de-allocation
Constructor automatically called when an object is created Destructor is automatically called when an object is destroyed
Constructor Destructor
Same name as class name Same name as class name but preceded by tilde (~) sign
Used for memory allocation/ initialization Used for memory de-allocation
Constructor automatically called when an object is created Destructor is automatically called when an object is destroyed
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
