i want to know, what kind of addresses do pointers deal with?
That's not specified.and how can i access a particular memory area using pointers?
It's not portable, but traditionally that's been done by something like this:
/* Point to address 0x12345678 and treat it as an int */
int *p = (int*)0x12345678;
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
It's a function of your OS and compiler.
If you're using a protected OS and your compiler is compatible with your OS (say Linux+gcc or Windows+visual studio), then you're dealing with logical addresses. You can invent whatever address you like, but if you choose badly, the OS will just serve up your ass on a plate with a segmentation fault.
If you're using a protected OS and your compiler is NOT compatible with your OS (say Windows+TurboCrap), then you're dealing with physical addresses in a virtual machine. You can invent whatever address you like, but the VM will either allow it or give you some fake answer (which is mostly in keeping with what the real machine would do).
If you're using a real mode OS (eg. DOS), or no OS at all, then you're using real addresses, and you can do whatever the hell you like. This includes destroying your hardware if you choose badly. There is no safety net, you're on your own.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Your question seems upside down:
"How I can use this solution, which does not work or does not work allways, to problem I have which I do not tell to you"
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852