How to print in_addr_t

This is a discussion on How to print in_addr_t within the C Programming forums, part of the General Programming Boards category; can anyone tell me how to print the IP address of the data type in_addr_t? Which function call should I ...

  1. #1
    Jack4638
    Join Date
    Dec 2005
    Posts
    1

    How to print in_addr_t

    can anyone tell me how to print the IP address of the data type in_addr_t?

    Which function call should I use?

    Thanks in advance.

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Hmm. Something like this?
    Code:
       in_addr_t addr;
       /* ... */
       puts(inet_ntoa(addr));
    Check your man pages.
    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. merging linked lists
    By scwizzo in forum C++ Programming
    Replies: 15
    Last Post: 09-14-2008, 05:07 PM
  2. Personal Program that is making me go wtf?
    By Submeg in forum C Programming
    Replies: 20
    Last Post: 06-27-2006, 12:13 AM
  3. Scope And Parameter Passing
    By djwicks in forum C Programming
    Replies: 6
    Last Post: 03-28-2005, 07:26 PM
  4. What kind of programs should I start writing?
    By Macabre in forum C++ Programming
    Replies: 23
    Last Post: 04-12-2003, 08:13 PM
  5. Replies: 1
    Last Post: 07-31-2002, 11:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21