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

Module - m02.html

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

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

//Item 2: Prefer consts, enums, and inlines to #defines. 13

//#include "mec.h"

#define TWO 2		// rule 2



Function Name: m2()

m2() {
	int i;
	i = TWO;	// rule 2
	enum number { two=2 };	// good
}

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

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