Hotel Booking system
I am trying to create a ms-dos hotel booking system for college.
It is just an exercise.
I need to mimic checking for room availability. If a certain room is booked for a certain date I need to know.
I am having trouble thinking of the best way to cross reference dates and rooms.
A 3d array? month, date, room?
Seems like the array will get really big
Anybody got any tips on how to structure this...
one way you could do it is create a Class, eg 'Accomodation'
give it attributes required, like
then declare an array of objects for this class, eg
So if I use malloc/realloc I can make that dynamic?
rather then a static 
Then I can search by date first, then, if any dates overlap, check each object by room
that should work.. seems a lot more efficient on memory.
For(amount of accomodation objects)
if (dates overlap)
if (room booked)
rooms are bookable, make booking (booking constructor)
yes but the thing is, in terms of modelling a hotel normally has a fixed number of rooms, and isnt that the point you need...that you want to check the register (read 'the properties of room object' ) of rooms and see if they are available or not, so the room must already be constructed to do that anway..?