I have a structure with various fields. And there are few global variables. The structure fields and the global variables (basically status-flags) denote same information. It doesnt make sense to have both of them in the RAM area. And i dnt wanna always use the '.' or '->' notations to access the structure fields as there are structure inside the structure.
Hence i feel that a way around is to use unions. But dont know how to use unions for structure in a structure type of variables. can somebody kindly give a small example or a good webpage detailing the same as i couldnt find any relevant thing on web highlighting such an example.
An example would be appreciable. Thank you in advance.