Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions

Front Cover
Addison-Wesley Professional, 2000 - Computers - 208 pages
16 Reviews

Exceptional C++ shows by example how to go about sound software engineering in standard C++. Do you enjoy solving thorny C++ problems and puzzles? Do you relish writing robust and extensible code? Then take a few minutes and challenge yourself with some tough C++ design and programming problems.

The puzzles and problems in Exceptional C++ not only entertain, they will help you hone your skills to become the sharpest C++ programmer you can be. Many of these problems are culled from the famous Guru of the Week feature of the Internet newsgroup comp.lang.c++.moderated, expanded and updated to conform to the official ISO/ANSI C++ Standard.

Each problem is rated according to difficulty and is designed to illustrate subtle programming mistakes or design considerations. After you've had a chance to attempt a solution yourself, the book then dissects the code, illustrates what went wrong, and shows how the problem can be fixed. Covering a broad range of C++ topics, the problems and solutions address critical issues such as:

  • Generic programming and how to write reusable templates
  • Exception safety issues and techniques
  • Robust class design and inheritance
  • Compiler firewalls and the Pimpl Idiom
  • Name lookup, namespaces, and the Interface Principle
  • Memory management issues and techniques
  • Traps, pitfalls, and anti-idioms
  • Optimization

Try your skills against the C++ masters and come away with the insight and experience to create more efficient, effective, robust, and portable C++ code.



0201615622B04062001
 

What people are saying - Write a review

User ratings

5 stars
9
4 stars
5
3 stars
1
2 stars
1
1 star
0

User Review - Flag as inappropriate

Great book talks about all advanced C++ features in a case by case style Finished on June, 2007

Contents

Generic Programming and the C++ Standard Library
1
CaseInsensitive StringsPart 1
4
CaseInsensitive StringsPart 2
7
Maximally Reusable Generic ContainersPart 1
9
Maximally Reusable Generic ContainersPart 2
10
Temporary Objects
18
Using the Standard Library or Temporaries Revisited
23
ExceptionSafety Issues and Techniques
25
Compiler and the Pimpl Idiom
99
Minimizing CompileTime Dependencies Part 2
102
Minimizing CompileTime Dependencies Part 3
106
Compilation Firewalls
109
The Fast Pimpl Idiom
111
Name Lookup Namespaces and the Interface Principle
119
Name Lookup and the Interface PrinciplePart 2
122
Name Lookup and the Interface PrinciplePart 3
130

Writing ExceptionSafe CodePart 1
26
Writing ExceptionSafe CodePart 2
30
Writing ExceptionSafe CodePart 3
32
Writing ExceptionSafe CodePart 4
37
Writing ExceptionSafe CodePart 5
39
Writing ExceptionSafe CodePart 6
45
Writing ExceptionSafe CodePart 7
50
Writing ExceptionSafe CodePart 8
52
Writing ExceptionSafe CodePart 9
55
Writing ExceptionSafe CodePart 10
58
Code ComplexityPart 1
60
Code ComplexityPart 2
63
Class Design and Inheritance
69
Overriding Virtual Functions
75
Class RelationshipPart 1
80
Class RelationshipPart 2
83
Uses and Abuses of Inheritance
88
ObjectOriented Programming
97
Name Lookup and the Interface PrinciplePart 4
133
Memory Management
141
Memory ManagementPart 2
144
auto_ ptr
150
Traps Pitfalls and AntiIdioms
161
Automatic Conversions
164
Object LifetimesPart 1
165
Object LifetimesPart 2
167
Miscellaneous Topics
175
ConstCorrectness
177
Cast
184
bool
189
Forwarding Functions
192
Control Flow
194
Afterword
203
Bibliography
205
Index
207
Copyright

Other editions - View all

Common terms and phrases

References to this book

All Book Search results »

About the author (2000)

Herb Sutter is the author of three highly acclaimed books, Exceptional C++ Style, Exceptional C++, and More Exceptional C++ (Addison-Wesley). He chairs the ISO C++ standards committee, and is contributing editor and columnist for C/C++ Users Journal. As a software architect for Microsoft, Sutter leads the design of C++ language extensions for .NET programming.



Bibliographic information