Links to official style guides

Other answers state that there is no official style guide, which was true at the time.

But in 2015, Bjarne Stroustrup announced the C++ Core Guidelines, an open source project to build authoritative guidelines for modern C++ code, led by Stroustrup himself and published by the Standard C++ Foundation:

http://github.com/isocpp/CppCoreGuidelines

In relevance to this question, the Core Guidelines also link to other guidelines, with added comments. About the often recommended Google C++ Style Guide, they say:

Geared toward C++03 and (also) older code bases. Google experts are now actively collaborating here on helping to improve these Guidelines, and hopefully to merge efforts so these can be a modern common set they could also recommend.


I have also written some tips for good coding in c++: http://www.ivanism.com/Articles/CodingStandards.html

The post starts with:

The goal of coding standards are to increase the business value of the code. The most obvious (and indeed most important) way to do this is to make the code robust and low defect. Equally important, but more subtle goals include reducing coder friction and maintainability. As such, standards should be kept minimal -- simple enough to actually follow, and important enough to remember.

These standards should be used when building new source files. When an existing file needs to be changed, that is an appropriate time to bring it up to standard. However, it's never a good time to edit a file merely to bring it up to standard. If it ain't broke, don't "fix it" and remember to always "Keep it Working".

You'll notice that I don't touch on the classic "Religious" points:

 tabs vs. spaces
 indentation style
 curly brace style
 etc...

Consistency within a file is important and improves readability. But allowing coders to express themselves is also important. So, if you edit a file, either conform to the religion of that file, or convert the whole file to a new, consistent format. If you convert the whole file, you are effectively taking ownership of it, so be prepared to be the go-to person, or leave it as is.


Not a Coding Guideline per se, but I find this mighty useful: Bjarne Stroustrup's C++ Style and Technique FAQ


There's no such thing as an "official" style guide - the C++ standard is entirely silent on style. One book on the subject by two highly knowledgable C++ guys is C++ Coding Standards by Sutter & Alexandrescu.