Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sample Code with Examples for the C++ Google Style Guide?

Are there any good places to get examples for the C++ Google Style Guide?

like image 771
leeand00 Avatar asked Jun 17 '10 14:06

leeand00


People also ask

What is a code style guide?

A style guide tells a developer how to work with a particular programming language. Programming style guides are composed of rules and guidance. Rules are mandates, with very few exceptions, enforceable throughout the entire IT organization. Rules make good and bad programming behavior explicit.

What is a coding style in C++?

The most commonly used style in C++ programming is ANSI or Allman while much C programming is still done in the Kernighan and Ritchie (K&R) style. You should be warned that this should be one of the first decisions you make on a project and in a democratic environment, a consensus can be very hard to achieve.

What is the purpose of the Google style guide?

This style guide provides editorial guidelines for writing clear and consistent Google-related developer documentation. If you're new to the guide and looking for introductory topics about our style, then start with Highlights, Voice and tone, and Text-formatting summary.

What is Google style sheet?

Every major open-source project has its own style guide: a set of conventions (sometimes arbitrary) about how to write code for that project. It is much easier to understand a large codebase when all the code in it is in a consistent style.


1 Answers

Google open sources a number of projects, most of which comply with their style guides:

  • protocol buffers
  • re2 - pcre regular expressions
  • perf tools - multithreaded performance analysis tools
  • gflags - command line flags

Search Google code for google projects, and you'll find a lot!

like image 71
Stephen Avatar answered Sep 20 '22 00:09

Stephen