c++ question

Dave Smith dave at thesmithfam.org
Fri Sep 22 14:08:52 MDT 2006

Russel Caldwell wrote:
> Sorry, I guess this is a bit off topic but does anybody know if there 
> is a
> way of obtaining the address where a character array is pointing to in 
> C++?

The pointer value *is* the address. For example:

   char *foo = ....

   printf( "The address is %p\n", foo );

You do not need to use the & operator.


More information about the PLUG mailing list