: I'm looking to right to a specific address. This will explain...
:
:
: #include <iostream.h>
:
: int main()
: {
: int a = 0;
:
: cout<< &a;
:
: // let's say the address of 'a' is 0x265dda4.
: // How would I write to the address of 0x265dda4?
:
: // 0x265dda4 = 12; ?
: }
:
:
: It doesn't really HAVE to be the address 0x265dda4. It could be anything. My point is, is there any way that C++ can write to a specific address? Arigato.
:
:
You can access only your address space in protected mode (as in Win32 or Unix), you cannot use far pointers. So you can do this:
int *a;
a = (int *)0x0265dda4;
*a = 10;
--
Long live Rock & Roll!
Psycho Clown.