Thread: How can you...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    34

    How can you...

    Make a copy of what is in a stack.
    No not copy the pointer.
    But i mean actually copy everything in a stack to another stack minus the same pointer locations. All while not altering the original stack.

    Thanks

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Show us your stack, and how you've implemented push and pop

  3. #3
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    You might want to take a look at memcpy, memmove, memset

    http://www.dinkumware.com/htm_cl/string.html#memcpy

    --Garfield
    1978 Silver Anniversary Corvette

  4. #4
    Sayeh
    Guest
    The stack is just a consecutive list of longs... very easy to copy.

Popular pages Recent additions subscribe to a feed