Modified pointers.cpp