Some more pointer exercises in C++