Inside one of my classes i've got a
Reservation * availability[30] = {nullptr};
(which I of course initialize later with some values).
Nevertheless, I've got a getReservations() function which is supposed to return a reference to that array of 30 elements, so that it can be used like:
getReservations()[i] ...
How should I declare that function?
= {};. It looks like you think all of the elements are initialized to thenullptryou've written, but they're actually value-initialized.