Thread: I seriously need help.

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    10

    Red face I seriously need help.

    I have a project that's due tomorrow... i fail hard lol, i didnt even know.


    The problem is, i need to write some kind of program that resembles an airline service, with 1 plane, i have to be able to save a client's information into each sit , and know if it's taken or not.

    I have no idea where i'm gonna start but i believe i have to use structures for the clients right? The question is, how do i save information into a structure and THEN save it into an array? arrays would be the seats.

    Could somebody explain that to me instead of telling me to go to google? cause i've been looking since this morning and there's nothing noob-friendly

    thanks

  2. #2
    Banal internet user
    Join Date
    Aug 2002
    Posts
    1,380
    If you have a structure like this:
    Code:
    struct Client {
      /* fields */
    };
    You can create an array of them the same way you would create an array of any other data type:
    Code:
    Client c[10];
    Oh and don't wait until the last minute to do projects.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    So what exactly have you been doing for the past 6 weeks?
    What do i need ? Help needed

    Sorry, but if you lack the interest to have spend ANY time at all on it during that time, then you deserve to fail.

    How To Ask Questions The Smart Way
    We're not here to save your ass just because "it's tomorrow".
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Quote Originally Posted by Salem View Post
    So what exactly have you been doing for the past 6 weeks?
    What do i need ? Help needed
    Sex, drugs and rock and roll, baby! Actually, scratch the sex - it's computer nerd stuff. Add beer and pizza.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    WOW strikes again.

    You don't seriously need help, you need to buckle down and take your education seriously.

  6. #6
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    best post title ever mate, youre not wrong,. now finish your pint and go and beg an extension off your tutor, and write a 1000 lines too, cout not allowed
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

Popular pages Recent additions subscribe to a feed