[TOC]
Namespace identifiers are lower case.
namespace dodo::network {
}Type names start with a capital.
class Person {
};Each noun within the type name starts with a capital, composite nouns each start with a capital.
class Logfile {
};
class LogfileAppender {
}Acronyms and such preserve case
class SMTPServer {
}Variables are lowercase.
void add( int quantity ) {
}Protected and private class attributes are suffixed with an underscore (_)
class Person {
protected:
Date birthdate_;
};int getAttrribute() const {
}No tabs. Indent is two spaces.
void foo( const Collection &collection ) {
if ( i.size() ) {
for ( auto i : collection ) {
}
else {
cout << "the collection is empty" << endl;
}
}