I have noticed that when I try to print a memory address to the screen I just get jibberish. But when ever I write the address to a text file it seems to be a valid address. Why does it not show up on the screen but yet it shows in the file?
I have noticed that when I try to print a memory address to the screen I just get jibberish. But when ever I write the address to a text file it seems to be a valid address. Why does it not show up on the screen but yet it shows in the file?
What does it show up as on screen? Like 0x0043FFD5?
How are you printing it?
Code:#include <iostream> using std::cout; using std::endl; int main(void) { int i; int *p = &i; cout <<"p is pointing to " <<p <<endl; p++; cout <<"p is now pointing to " <<p <<endl; return(0); }
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
... ?
"He who makes a beast of himself, gets rid of the pain of being a man." Dr. Johnson