Use const
in function prototypes wherever an object pointed to by
a pointer is constant (obviously). For variables which are meaningfully
constant within a function/scope use const
also. This prevents
you from accidentally modifying a variable which should be constant
(e.g. length of an array, etc). It can also help the compiler do
optimization. These comments also apply to arguments passed by value
which should be made const
when that is meaningful.