C++ Programming StyleDesign and coding style rules are distilled from the examples. Understanding and following these rules will help professional programmers design and write better C++ programs. A chapter is devoted to each of the following topics: * abstractions * operator overloading * consistency * wrappers * unnecessary inheritance * efficiency * virtual functions Building on the programming rules introduced in the first seven chapters, Cargill presents a case study in which a single program undergoes repeated transformations that improve its overall quality while reducing its size. The book concludes with a chapter on multiple inheritance. |
Contents
Abstraction | 7 |
Consistency | 29 |
Unnecessary Inheritance | 49 |
Copyright | |
7 other sections not shown
Other editions - View all
Common terms and phrases
_length abstraction allocated assignment Beefalo behavior BigInt Bottom object byte C++ programs calls CDRom Chapter char name char public character array CharStack class invariants class string client code Color Component Computer concat const BigInt& const char cout data member declarations default arguments defaultStack defined delete derived class destructor Dial digits DigitStream Directory object DomesticAnimal doom_state dynamic encapsulation end_state error execution FileArray object FileArray::operator FileArray& filePtr fstream function overloading HeapStats identify implementation include string.h inheritance hierarchy input expression input_string instantiated int price integer interactions IntStack loop maxDigits member function member object memory leak multiple inheritance null pointer off-by-one error operator delete operator overloading operator+ overloaded operator parent plate problem rebate reset Sampler server shown in Listing SimpleString SimpleString& Stack StackIndex statel static member strcpy streampos string.h strlen struct sumptr Top::operator transition graph Truck unsigned Vehicle virtual base class virtual functions virtual int