CPP best practice
For general project
Add function/method/class description in header file.
Clear and concise comments in function/method body.
Remove debugging output in submitted code.
Replicating code —> function.
OOP
Rules of 3: If define define all three i.e. copy constructor, copy assignment, destructor.
Overload getter on const. Eg.
1 | Event const& getEvent() const; |
Do not use namespace in headers.