I have the following structs of which **seating becomes a 2d array of patrons. I want to bounds check this before placing a patron in a seat. Specifically, if seating is 2x2 and I want to know how to detect a legal insert and catch an out of bounds;
theatre_seating *t;
t->seating[0][0]=some_patron; // how to know this is ok?
and that
t->seating[3][4]=some_patron; // how to know this is not?
The structs.
struct patron {
char last_name[30];
char first_name[30];
};
struct theatre_seating {
struct patron **seating;
};