do destructors have a return type? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

do destructors have a return type?

3rd Feb 2017, 6:17 AM
Srikanth Srinivasan
Srikanth Srinivasan - avatar
3 Answers
+ 27
no.. they are generally used to delete something... they do not return anything :/
3rd Feb 2017, 7:01 AM
Frost
Frost - avatar
+ 1
No
3rd Feb 2017, 10:38 AM
Vishnu V
Vishnu V - avatar
+ 1
no as constructor and destructor are called special manager functions so they do not have return type
3rd Feb 2017, 4:15 PM
Wazed Ali Gazi
Wazed Ali Gazi - avatar