Editing C++ style guide
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 157: | Line 157: | ||
=== Class declarations === | === Class declarations === | ||
The access specifier ({{codeline|public}}, {{codeline|protected}}, {{codeline|private}}) should always be stated rather than relying on the C++ language defaults for a particular object (for example, " | The access specifier ({{codeline|public}}, {{codeline|protected}}, {{codeline|private}}) should always be stated rather than relying on the C++ language defaults for a particular object (for example, "class" = "private"). | ||
Within a class, the different access blocks should appear in the order 1) | Within a class, the different access blocks should appear in the order 1) public, 2) protected, 3) private. | ||
Within an access block, member functions (methods) should be specified before member variables. If there are both member functions and member variables use | Within an access block, member functions (methods) should be specified before member variables. If there are both member functions and member variables use |