Deleting a row from a struct.

This is a discussion on Deleting a row from a struct. within the C++ Programming forums, part of the General Programming Boards category; Code: struct people { char firstname[60]; char lastname[60]; int age; }; How do i delete a row based on firstname? ...

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    1

    Deleting a row from a struct.

    Code:
    struct people
    {
    char firstname[60];
    char lastname[60];
    int age;
    };
    How do i delete a row based on firstname?

    For example in row 4 there would be

    name,name,10

    If i input name, i'd want the 4th row to disappear and 5th row move on to 4th row and so on.

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    2,391
    it depends entirely upon what sort of container you are using to store the "rows."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 05-12-2011, 01:02 AM
  2. struct holding data inside a linked list struct
    By icestorm in forum C Programming
    Replies: 2
    Last Post: 10-06-2009, 12:49 PM
  3. Creating and deleting directories and deleting files
    By fguy817817 in forum C Programming
    Replies: 1
    Last Post: 04-08-2009, 07:26 AM
  4. Deleting all data in a struct array
    By grimuth in forum C++ Programming
    Replies: 11
    Last Post: 03-29-2008, 11:02 PM
  5. need help deleting a deleting a struct from file
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 05-20-2002, 05:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21