Rabu, 17 November 2010
Pure virtual destructors in C++
To work correctly, classes with virtual methods must also have virtual destructors. Interestingly, virtual destructors can be declared pure, which can be useful in some cases.Imagine you have a base class you want to make abstract. In this base class all methods have meaningful default implementations, and you want to allow the derived classes to inherit them as-is. However, to make a class
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar