Re: Question
- From: Richard Heathfield <invalid@xxxxxxxxxxxxxxx>
- Date: Mon, 17 Oct 2005 09:05:33 +0000 (UTC)
DarkD said:
> Im not sure you fully understand a pointer.
I'm not sure you do. :-)
> He is pointing to that memory
> location and displaying the integer value from that location. If you did
> this:
>
> int x;
> x = *&0x00c0;
> printf("Value at address 0x00c0 is %d\n",x);
You meant that to be:
int x;
x = *(int *)0x00c0;
printf("Value at address 0x00c0 is %d\n",x);
The code is, of course, non-portable, but may work anyway on some systems.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/2005
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.
- References:
- Re: Question
- From: DarkD
- Re: Question
- Prev by Date: Re: Typical work day
- Next by Date: Re: Multi-dimensional data structure
- Previous by thread: Re: Question
- Next by thread: C++ joke post --troll like style- EXPLAINED!
- Index(es):
Relevant Pages
|