As commercial developers of software components, we always
strive to have good, consistent style throughout our
code. Since source code is usually included in our final products,
our users often study our code to learn not just how the
components work, but also how to write good software.
This fact ultimately led to the creation of a style guide for
JavaTM programming, entitled The Elements of Java Style.1 The
positive reception to that book, coupled with recurring questions
about C++ style issues, resulted in this edition for C++.
If you’ve read The Elements of Java Style (or even if you haven’t),
much of the advice in this book will probably be familiar. This
is deliberate, as many of the programming principles described
are timeless and valid across programming languages. However,
the content has been reworked and expanded here to
address the unique characteristics of the C++ language.