If you have time, you can do a deep analysis of the code, like after every time a variable is changed, you can dump what that value currently is.
like:for(int i=0;i<size;++i) std::cout<<"ptr1("<<i<<") is:"<<ptr1[i]<<".\n";
(Just an example, if you did this after ptr1 it is initialized, they are all 0)