Is it possible to have a pointer point to a SPECIFIC memory address? I want to be able to edit one certain address, and I'm not sure how to go about doing it.
I would've assumed that something similar to
but it turns out that this is untrue.Code:int* ptr; ptr = 0x83fc22;
(Background info: I'm using devc++, I am a novice to the concept of pointers, but I am not a novice to programming. I generally program in .NET (vb.net and c#) and Java. )
Do you know how or if this can be done?
Also, another pointer question, while I'm at it: How can I get something's memory address into an int?
As an example, let's say that I want to do something like this
Code:int x; int y; y = &x; //Obviously, this won't work. But, I want y to equal //something like '0x2fecd0' y += 5; //so that y can NOW equal 0x2fecd5 cout << "Five more than the memory address of x is "<< y;



LinkBack URL
About LinkBacks


