is this funtion possible? i am to cancel an element to an array...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prakatak7410
    New Member
    • Dec 2009
    • 6

    is this funtion possible? i am to cancel an element to an array...

    void cancelReservati on(SEAT p[][COLS])
    {
    int row;
    int col;
    getSeat(p, row, col);
    if(p[row][col].occupied==fals e)
    cout<<"The reservation is empty.";
    else
    p[row][col].occupied=false ;
    }
  • puneetsardana88
    New Member
    • Aug 2009
    • 57

    #2
    Here row and col are unintialized and where are you storing return type of getseat?Is it in p?

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      You don't need the call to getSeat.

      But you do the row and col as arguments to Cancel Reservation, then your
      p[row][col] will work.

      Comment

      Working...