Hi, i want to ask about constructors and destructors in c++
C++ programming
Collapse
X
-
tel yar.. what u want wheter definiton r anything else....Originally posted by skaurasHi, i want to ask about constructors and destructors in c++Comment
-
Class name and constructor names are same. Destructor gets a ~ symbol before the name.Originally posted by skaurasHi, i want to ask about constructors and destructors in c++
When the object creates the contructor invoked .
when the object delets the destructor invoked.
Mostly contructor used to allocate the memory and initiate the members.
Destructor used to deallocate the memory.Comment
Comment