Got the following code for the pointer reference counting in C++, but the answer is not as expected. Looks I am doing something wrong. Please help.
RefCountPtr refSecondPointer = refPointer; // this calls copy constructor.
Above program is giving the following output.