Show Menu
Cheatography

Coding Guideline Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Naming Convention

function
lowerC­ame­lCase()
class
UpperC­ame­lCase{}
enum class
UpperC­ame­lCase {}
enum element
UpperC­ame­lCase = 1;
public static attributes
lowerC­ame­lCase = 1;
private non-static attributes
m_lowe­rCa­melCase = 1;
 

Example class structure

//======================================================================
 
class A {
public: // public types
    typedef uint32_t Key;
 
public: // constructors and destructors
    A();
    ~A();
 
public: // public interface
    void foo();
 
private: // private attributes
    Key m_key;
}; // A                                     <-- class end
 
//======================================================================

A::MyA{
…
}; // A::MyA