Which file does Destructor need to be defined | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Which file does Destructor need to be defined

I am confused that about destructor. It is defined in header file then implement in Cpp file?

20th Nov 2018, 11:02 PM
Jimmy Chen
Jimmy Chen  - avatar
1 Answer
+ 1
Yup! Like all other functions, the definition goes into the header and the implementation into the .cpp
21st Nov 2018, 12:23 AM
Schindlabua
Schindlabua - avatar