Thread: [Win32] Wrapping in_addr in a class

  1. #1
    Join Date
    Jun 2004

    [Win32] Wrapping in_addr in a class

    I'm trying to make a neat wrapper that wraps the IP address structures. However, I'm grappling with how to make the class both IPv4 and IPv6 friendly. Can anyone provide any resources (code snippets, links, etc) that can shed some light on how I may approach my design?

    Founder and avid member of the Internationsl Typo Associateion

  2. #2
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007
    Just don't use the IPv4 in_addr class. If your wrapper gets passed an IPv4, simply properly load it into the IPv6 class, by taking advantage of it's backwards-compatibility.
    I just want to use my computer in a productive manner, not learn how to use it. Elysia
    A year spent in artificial intelligence is enough to make one believe in God. Alan Jay Perlis

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with FIFO QUEUE
    By jackfraust in forum C++ Programming
    Replies: 23
    Last Post: 04-03-2009, 08:17 AM
  2. Class design problem
    By h3ro in forum C++ Programming
    Replies: 10
    Last Post: 12-19-2008, 09:10 AM
  3. matrix class
    By shuo in forum C++ Programming
    Replies: 2
    Last Post: 07-13-2007, 01:03 AM
  4. Replies: 7
    Last Post: 05-26-2005, 10:48 AM
  5. Abstract class problem
    By VanJay011379 in forum C++ Programming
    Replies: 9
    Last Post: 07-31-2002, 01:30 PM