Memory address and Pointer



vc++6.0,winxp.
I use this code to see the memory address and the real value`s
address below:
#include<stdio.h>
int main()
{
int a=22;
int *p;
int i;
p=&a;
printf("%x\n",&a);
printf("%p\n",*p);
}
the result is:
12ff7c
00000016
Press any key to continue

the pointer p is pointing to a value which is 22,and the address of
the value is 0012ff7c.
i want to compare the memory address with the value address to see
wheather they are the same.
So ,next,i use win Debug to help me.
-d 0012:ff7c
but the output is 00 00 00 00 00 00 00 00 00......
what`s wrong? as far as i know,the value of a,must have it`s address
in the memory,and when i search the address,why there is nothing left
in it. there must be some mistake in my understanding,i really expect
your words~~


.



Relevant Pages

  • Re: (VC++ 6.0) Strange single step behavior
    ... While I debug an application in VS 6.0, I noticed a strange behavior: ... Value of a local variable (an int) increases by one for every single step. ... assigned any memory. ...
    (microsoft.public.vc.language)
  • [PATCH] drm: Add GEM ("graphics execution manager") to i915 driver.
    ... * Binds a collection of pages into AGP memory at the given offset, ... new file mode 100644 ... * The above copyright notice and this permission notice (including the ... +static int ...
    (Linux-Kernel)
  • [PATCH] drm: Add GEM ("graphics execution manager") to i915 driver.
    ... * Binds a collection of pages into AGP memory at the given offset, ... new file mode 100644 ... * The above copyright notice and this permission notice (including the ... +static int ...
    (Linux-Kernel)
  • [PATCH 8/19] TuxOnIce: Add core TuxOnIce code.
    ... Add the core TuxOnIce code, including hooks in snapshot.c so TuxOnIce ... can use the atomic copy and restore functions, ... +extern int toi_running; ... * system memory to an arbitrary storage device, either on the local computer, ...
    (Linux-Kernel)
  • [git patches] net driver updates
    ... DM9000 update debugging macros to use debug level ... Pass IRQ flags via platform resources ... PS3: gelic: Fix the wrong dev_id passed ... module_param(watchdog, int, 0400); ...
    (Linux-Kernel)