Skip to content

Instantly share code, notes, and snippets.

@joyhuang9473
Last active October 18, 2015 08:09
Show Gist options
  • Select an option

  • Save joyhuang9473/f73c3071d3e089f43f68 to your computer and use it in GitHub Desktop.

Select an option

Save joyhuang9473/f73c3071d3e089f43f68 to your computer and use it in GitHub Desktop.
Sections in public, protected and private order, each indented zero space.
class MyClass : public OtherClass {
public: // Note the 0 space indent!
MyClass(); // Regular 4 space indent.
explicit MyClass(int var);
~MyClass() {}
void someFunction();
void setSomeVar(int var);
int getSomeVar();
private:
bool someInternalFunction();
int some_var_;
int some_other_var_;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment