Results 1 to 9 of 9

Thread: [RESOLVED] Swapping Collection Members' Positions

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member neef's Avatar
    Join Date
    Dec 2001
    Location
    Boston
    Posts
    311

    [RESOLVED] Swapping Collection Members' Positions

    This I'm almost certain is an easy problem for those with more experience than me. I just need a routine that trades the places of 2 members of a collection class.

    For example: If there are 5 objects stored in a CList of() collection class, I want to swap item # 3 and #5 (or any pair of indexes), what would be the code?

    This simple problem has my head spinning because once you remove a member all the indexes change.

    Thanks.
    Last edited by neef; Jul 22nd, 2009 at 09:19 AM.
    Intermediate Level Programmer Extraordinaire

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width