Make the bookings vector an object in the reservation vector.
1 2 3 4 5 6 7
class Reservation{
Reservation();
public:
vector<Bookings> bookVector;
}
vector<Reservation> ReservationVector;
now refer to them like:
1 2 3 4
for (vector<Reservation>::iterator i = ReservationVector.begin(); i < ReservationVector.end(); i++)
for (vector<Bookings>::iterator j = i->bookVector.begin(); j<i->bookVector.end();j++)
cout << j->date; //Will output the date of each booking.
Otherwise if you want a vector in a vector (2D), they need to be of the same type: vector<vector<Reservation> > Reservations2D;