About
Big Bad Robots is an independent Game Studio that creates original social oriented Games for the Web and iPhone that packages old school fun using cutting edge technologies. We focus on development of compelling multi-user and multi-platform products that encourages social interaction through creative user generated content creation.
Formating your class header…
September 12, 2009
This is more of a note to self about how to format a C++ header file based on what I think is important:
class MyClass
{
public:
<Public defined enums and constants>
public:
<Public variables OR Get/Set functions. Public variables are frowned upon anyways>
public:
<Public defined interfaces and constructors
private:
<Private variables>
private:
<Private functions>
};
The basic rules of thumb are:
- Public interfaces are on top because that is the first thing programmers reading your code want to know without scrolling down through the rest of the file.
- Protected interfaces follow
- Private interfaces are last (and often don’t change)
- Be consistent
- Use white spaces
- Split up constants, variables and interfaces with seperate “public/protected/privates”s



