Thread: Format Specs

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    99

    Format Specs

    Why should i use %p for pointer when i can use %u for address ?

  2. #2
    Registered User OnionKnight's Avatar
    Join Date
    Jan 2005
    Posts
    555
    %p will output it in a nice readable way (identical to %08X on my machine I think), and I also think there's no guarantee that pointers can be treated as integers.

  3. #3
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by vb.bajpai View Post
    Why should i use %p for pointer when i can use %u for address ?
    Because %p is correct, %u isn't.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GradeInfo
    By kirksson in forum C Programming
    Replies: 23
    Last Post: 07-16-2008, 03:27 PM
  2. how can you see the specs of a file format
    By programm in forum Game Programming
    Replies: 2
    Last Post: 09-23-2006, 12:14 PM
  3. Compression/Decompression Wave File and MP3
    By cindy_16051988 in forum Projects and Job Recruitment
    Replies: 51
    Last Post: 04-29-2006, 06:25 AM
  4. A Better Format Simulator
    By toonlover in forum C++ Programming
    Replies: 2
    Last Post: 01-07-2006, 06:14 PM
  5. Seeking Format Advice
    By PsychoBrat in forum Game Programming
    Replies: 3
    Last Post: 10-05-2005, 05:41 AM