Thread: reorganising array data

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    31

    reorganising array data

    I have loaded some data into an array of 80. how do i go about removing the first element of the array and pusing everything else one position in the array?

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    How about a loop? Or a loop disguised as a function (memmove)? In either case, you'll still need to have some way of keeping track of how many items you have, because you'll end up duping the last entry you move. So you need a way to mark "empty" or to keep track of the "length".

    Post your attempt.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    This is mostly a specialised version of what you already asked here:

    http://cboard.cprogramming.com/showthread.php?t=75832

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pick data from file store in array
    By swgh in forum C Programming
    Replies: 1
    Last Post: 07-10-2009, 09:57 AM
  2. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  3. Dynamic Array substitution in composite data variable
    By DavidDobson in forum C Programming
    Replies: 2
    Last Post: 08-12-2008, 04:29 AM
  4. Replies: 2
    Last Post: 07-11-2008, 07:39 AM
  5. Template Array Class
    By hpy_gilmore8 in forum C++ Programming
    Replies: 15
    Last Post: 04-11-2004, 11:15 PM