Results 1 to 9 of 9

Thread: display pointer memory address

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2009
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default display pointer memory address

    First post from a qt newbie.
    How can I achieve this in qt4. What header
    files would I need to include? If possible a simple code example would be really appreciated.

    int variable = 2;
    int* pointer = &variable;

    cout<<*pointer<<endl; //displays 2
    cout<<pointer<<endl; //displays the location of "variable"

    Thanks in advance.
    Milo
    Last edited by milosav; 4th June 2009 at 00:47. Reason: spelling error

Similar Threads

  1. Memory debugging in windows
    By txandi in forum Qt Programming
    Replies: 3
    Last Post: 20th February 2009, 13:45
  2. How to display My Current System IP Address...???
    By maveric in forum Qt Programming
    Replies: 8
    Last Post: 4th August 2008, 17:22
  3. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.