Hi,
This probably sounds daft but im trying to keep my code tidy.
I have a structure defined, like the one below
struct property house[9];Code:struct property { int beds; int rooms; int property_specific }
struct property flat[4];
is there a simple way i can also change the name of the property_specific, for example
currently if i want to access that variable on flat 6 it would be flat[6].property_specific = ........
ideally i would like to make it so if house is the struct property_ specific is garden and flat it would be balcony, and be accessed something like flat[6].balcony = .........
im guessing it would be a pointer but im not sure how to point to just that specific variable
thanks



2Likes
LinkBack URL
About LinkBacks


