Declaring variables with "auto" in C++

Declaring variables with "auto" in C++

One of the new features in C++ 11 is the automatic type deduction: auto. With auto you can declare a variable or an object without specifying its type.

Prefer pre-increment to post-increment

Avoid wasteful overhead on user-defined types by using pre-increment rather than post-increment.

How to remove vector elements in a loop?

How to remove vector elements in a loop?

Have you ever wondered how you could delete vector elements in C++ in a loop? This is a way to do it... 

C++ tip 16: References are Aliases, not Pointers

C++ tip 16: References are Aliases, not Pointers

Don't confuse references for pointers. References are another name for an object which currently exist. They are not Pointers.

C++ tip 15: Delay construction of objects until they are needed

C++ tip 15: Delay construction of objects until they are needed

Don't call an object constructor unless you are sure you will use it. Delay its construction as much as possible.