Abraxas/Meyers: Effective C++  Home  Table of Contents

Module - m07.html

ABRAXAS SOFTWARE - CodeCheck Meyers: Effective C++ Test-Suite

Meyers: Effective C++ Test Suite for Module - m07.cpp

// Item 7: Declare destructors virtual in polymorphic base classes. pg-40

class Time {
public:
	Time();
	~Time();		// rule 7
};
class Fire : public Time {
};



Function Name: m7()

m7() {
Time *pt= getTime();
delete pt;
}
class Time1 {
public:
	Time1();
	virtual ~Time1() {	}



Function Name: Time1()

};



Function Name: Time1()

virtual Time1::~Time1() {	}
class Water : public Time1 {
};



Function Name: m7a()

m7a() {
Time1 *pt= getTime();
delete pt;
}

Abraxas/Meyers: Effective C++  Home  Table of Contents

ABRAXAS SOFTWARE - CodeCheck Meyers: Effective C++ Test-Suite