Hi, i got this program to book seats for a cinema show.if trying to book seats already booked,a exception is thrown.code is as follows.
Code:try{ if(ifFoundBookedSeats==true){ if(invalidSeatList){ cout<<"\n$$$$$$$$$$$$$$4"; } cout<<"\nsize"<<invalidSeats.size(); cout<<"\n &"<<invalidSeats[0]; cout<<"\n &"<<invalidSeats[1]; cout<<"\n &"<<invalidSeats[2]; throw SeatsNotFreeException(invalidSeatList,invalidSeats.size());// error line } } catch(SeatsNotFreeException ex){ //try booking alternative seats // if(ex.bookAlternativeSeats(showSeatList)==true){ // //replace invalid seat numbers with new seat numbers. // adjustSeatList(seatList,numOfSeats,invalidSeats,ex.getNewValidSeats()); // isSeatsBooked=true; // } }
when i run it,it gives me a error: unhandled excpetion at this line "throw SeatsNotFreeException(invalidSeatList,invalidSeats .size());"
when i run it in dev c++... it works fine..no error
run it in microsoft visual compiler.....dang..gives me error !
help !!!!



LinkBack URL
About LinkBacks


