When should i make a function private
and why is it good idea?
private: only used by this class, not used by other classes nor derived classes.
protected: used by this class and maybe derived classes, but not used by other classes.
public: used by other class, this class, and derived class.
It's hard to choose between private and protected. So I always make a function protected if there is 1% chance that derived classes may need it.