Thread: Memory address?

  1. #1

    Memory address?

    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?

  2. #2
    I lurk
    Join Date
    Aug 2002
    What does it show up as on screen? Like 0x0043FFD5?

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    How are you printing it?
    #include <iostream>
    using std::cout;
    using std::endl;
    int main(void)
      int i;
      int *p = &i;
      cout <<"p is pointing to " <<p <<endl;  
      cout <<"p is now pointing to " <<p <<endl;  
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Thanks hammer.

  5. #5
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001


    ... ?
    "He who makes a beast of himself, gets rid of the pain of being a man." Dr. Johnson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. tools for finding memory leaks
    By stanlvw in forum C++ Programming
    Replies: 4
    Last Post: 04-03-2009, 11:41 AM
  2. Pointer to specific memory address
    By elnerdo in forum C++ Programming
    Replies: 10
    Last Post: 05-19-2006, 07:35 AM
  3. Memory Address
    By Stack Overflow in forum C Programming
    Replies: 5
    Last Post: 05-25-2004, 11:43 AM
  4. how to get memory address applied in other program?
    By wu7up in forum C Programming
    Replies: 1
    Last Post: 03-01-2003, 01:44 AM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM