Thread: swap()

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User divineleft's Avatar
    Join Date
    Jul 2006
    Posts
    158
    Never mind, I just had to use " swap(inventory[2], inventory[3]);"

    delete/lock/ban/prob me

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Wouldn't it be easier to use a plain old vector, and display the contents with the index number. If the user selects a number, just erase the element at that index.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. linked list swap function
    By Axel in forum C Programming
    Replies: 32
    Last Post: 01-16-2011, 09:40 AM
  2. Atomic compare and swap.
    By Maz in forum C Programming
    Replies: 3
    Last Post: 04-07-2009, 02:47 PM
  3. using swap to make assignment operator exception safe
    By George2 in forum C++ Programming
    Replies: 9
    Last Post: 01-10-2008, 06:32 AM
  4. Double Link List Swap function
    By kennny2004 in forum C++ Programming
    Replies: 1
    Last Post: 04-12-2006, 11:52 AM
  5. Skipping DX swap chain node - not good...
    By Magos in forum Game Programming
    Replies: 0
    Last Post: 03-02-2006, 08:37 PM