C++ File Organisation
Each class has their own ClassName.cpp
and ClassName.h
files. The .h
files will hold all usages (#include
statements) and declarations. The .cpp
files will hold respective definitions.
.h
style:
#ifndef PROJECTNAME_CLASSNAME_H
#define PROJECTNAME_CLASSNAME_H
#include <include>
class ClassName{
};
#endif // PROJECTNAME_CLASSNAME_H