DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Displaying Memory address in C++

  1. #1
    Join Date
    Nov 2006
    Posts
    11

    Displaying Memory address in C++

    Displaying Memory address

    Dear expert,


    i was able to print the memory address in c.However i need to use c++ to do
    the functions.

    Right now i am printing the address in C such that:

    printf("\nMy stack looks like:\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%
    p\n%p\n%p\
    n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\n%p\
    n%p\n%p\n% p\n%p\n%p\n");

    The above will print the addresses.I need to use C++ to do display the addre
    sses.

    cout<<"address arguments";

    i have used #include<iostream> but it does not work???is there some other sy
    tax i should use??

    rgds

  2. #2
    Join Date
    Dec 2003
    Posts
    3,366
    printf works fine in c++ and since you already have the statement you want, just use it there, rather than re-write it.

    #include<cstdio>
    using namespace std; //printf is now unlocked

Similar Threads

  1. Replies: 1
    Last Post: 01-28-2006, 07:59 AM
  2. Replies: 12
    Last Post: 07-03-2005, 04:56 PM
  3. Displaying Free Memory
    By Lithic in forum .NET
    Replies: 1
    Last Post: 03-17-2005, 01:19 AM
  4. help memory
    By kathy in forum Java
    Replies: 0
    Last Post: 11-02-2001, 05:22 PM
  5. Intranet project: Remove Address Bar from displaying
    By fred in forum Architecture and Design
    Replies: 0
    Last Post: 04-09-2001, 10:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center