In writing a copy constructor for a class that holds a pointer to dynamically allocated memory, I have a question.
How can I specify that I want the value of the pointer
I do not see the context, but the code you posted doesn't seem like copying the pointer, it is exactly what you ask for — copying whatever it points to. Provided that foo points to the allocated object.