pointer reference counting in C++

2013-03-14 Thread Kevin Peterson
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. #include using namespace std; template class RefCountPtr { public: explicit RefCountPtr(T* p = NULL) {

Re: pointer reference counting in C++

2013-03-14 Thread Kevin Peterson
sending again On Thu, Mar 14, 2013 at 5:36 PM, Kevin Peterson wrote: > 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. > > #include ** > > using namespace std; > > template **class RefCountPtr