// Prevent assignment: Dog& operator=(const Dog& rv);
This invalidates the assignement operator, so when you think you are doing "p = dh.p;", as in copying dh.p in p, you are instead doing virtuall nothing.
Word of advice,
whether you c&p this or wrote it yourself, (ok, so you didn't write it, still:) this code could really need some spacing. Thats horrible to read, try to at least put a spacing between every function, wasn't the problem so obvious, it might have taken a while to find out why...