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

Module - m26.html

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

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

// Item 26: Postpone variable definitions as long as possible. 113

class Student  {
public:
	Student();
	Reject(Student &);
};



Function Name: validateStudent()

bool validateStudent( const Student & s ) {
	Student probation; // rule 26
	// ...
	Student apply;		// good
	if ( Reject(apply) ) {
		return( &probation );
	}
}

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

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