You could do a union:
Code:
enum property { HOUSE, FLAT };
union info {
int garden;
int balcony;
};
struct property {
int beds;
int rooms;
enum property property_type; /* use a value from enum property */
union info property_specific;
};
and use as, for example
Code:
struct property item[13];
item[0].beds = 3; item[0].rooms = 2; item[0].property_type = HOUSE; item[0].property_specific.garden = 42;
item[1].beds = 1; item[1].rooms = 3; item[1].property_type = FLAT; item[1].property_specific.balcony = 42;