470,833 Members | 1,620 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

get memory address of pointer

hi, how would i get the memory address of a said pointer in my program? thanks
--
-iwdu15
Mar 2 '06 #1
2 1153
> hi, how would i get the memory address of a said pointer in my program?
thanks
--


to get the address the pointer is pointing to:
char ptr[] = "test";
printf("address = %p", ptr);

to get it as a value:
size_t address = (size_t)ptr;

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"
Mar 2 '06 #2
To get any type of useful answer you are going to have to elaborate on what
you mean.

"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:1E**********************************@microsof t.com...
hi, how would i get the memory address of a said pointer in my program?
thanks
--
-iwdu15

Mar 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

32 posts views Thread by John | last post: by
10 posts views Thread by s.subbarayan | last post: by
62 posts views Thread by ivan.leben | last post: by
20 posts views Thread by sethukr | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.