Nokia interview question

Implement a shared pointer in C++.