Code snippets with some features of C++.
- Safety first, used to protect the code;
- Const functions cannot edit or alter the member variables;
- So if a function does not change any member variable of the class, make it const;
- Const object can call olny const functions;
- CODE SNIPPET
- The parameter can't be modified in the function;
- Users of the function can be sure that their object will not be changed;
- No worry about side effects;
- CODE SNIPPET