Checking for empty space in an array

Discussion in 'Software' started by upallnight, Nov 21, 2007.

  1. upallnight

    upallnight Private E-2

    Is it possible check an array for empty space?

    What I need to do is:

    create an array

    user enters name
    user enters preference 1 (1-9) or 2 (10-15)

    check availability of an empty space (1-9) in the array
    input a value and assign name to that space

    check availability of an empty space (10-15) in the array
    input a value and assign name to that space

    if either one is full
    try preference 1 or vise versa
    else try back in 3 days

    create a function to print user name and preference

    Thank you
     
  2. mastermosley

    mastermosley Sergeant

    Ya its quite possible, what language are you refering too?:major
     
  3. Akumos

    Akumos Private E-2

    java would be:

    if (array[element] == null) {

    statement;

    }
     
  4. upallnight

    upallnight Private E-2

    Last night I changed the whole program, while trying to talk to family and eating thanks giving dinner and drinking...


    I'm trying to create an array to store names:


    string seating[name]

    cout << "NAME: ";
    can't find in book how to read input and then store this into the array;
     
  5. upallnight

    upallnight Private E-2

    So sorry, the language C++
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds