I want to make a program to get the value saved at the particular memory address.
suppose i have opened two konsole windows.
In first window i have made a program in which i have declare a variable.
int a = 50;
i print its memory address.
cout << &a;
in another window i want to make a program so that i can get the value at the memory address as printed in the output of the first program.
guestgulkan, you understood my question correctly??
Maybe I don't.
I read your question a couple of times, and based my answer on the fact that you seem to imply the use of two different programs.
To me this seemed that you have two different programs (or processes) and wanted one process to be able to access some data directly from the address space of the other process.