Thread: Structures

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    10

    Structures

    Hello Everybody :
    i'm doing that list for a program
    1. add
    2. modify
    3. delete

    i use structures to make a database , but i really need to know how to delete a name from this record after saving it ,
    any ideas ? i'll be so thankfull ...

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    247
    Well without a detailed description of what you are trying to acheive, I dont think we stand a chance of knowing what your on about. More details please and at least some code.
    hoping to be certified (programming in c)
    here's the news - I'm officially certified.

  3. #3
    Unregistered
    Guest
    in breif , HOW TO DELETE A SPECIFIC RECORD FROM AN ARRAY AFTER STORING IT ??? (NEED A FUNCTION)

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >HOW TO DELETE A SPECIFIC RECORD FROM AN ARRAY AFTER STORING IT
    Posting the same vague question again but this time in caps doesn't help us very much. But since you actually told us the data structure that you're using I can offer a suggestion. Because this is an array you will have a difficult time deleting a record from anywhere but the end because you have to delete the record, shift all records after it to fill the empty spot, and then resize the array to match the new number of elements. There is no standard function to delete from an array so you will have to write it yourself.

    >(NEED A FUNCTION)
    For the resizing part I can help, look for a function called realloc.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 07-11-2008, 07:39 AM
  2. Structures, passing array of structures to function
    By saahmed in forum C Programming
    Replies: 10
    Last Post: 04-05-2006, 11:06 PM
  3. Input output with structures
    By barim in forum C Programming
    Replies: 10
    Last Post: 04-27-2004, 08:00 PM
  4. pointers to arrays of structures
    By terryrmcgowan in forum C Programming
    Replies: 1
    Last Post: 06-25-2003, 09:04 AM
  5. Methods for Sorting Structures by Element...
    By Sebastiani in forum C Programming
    Replies: 9
    Last Post: 09-14-2001, 12:59 PM