Safe C++: How to avoid common mistakes