The Fundamental of C++11 std::unique_ptr

In this post, we will look at the basic usage of one of the c++11 smart point  -  std::unique_ptr. It will cover the basic usage, the traps and the best practices when using unique_ptr as the function parameters and/or return values. Need some effort to wrap you head around what unique_ptr is and how to use it properly and effectively. But once you understand it, life with C++ will be much more easier. OK, no more talk. Here is the code, which you can just copy and run it immediately in