We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello
Normall in an application we define global variable as: int a; int b; ...
How about use one structure to include all variables, and just define one structure instance? as below: struct{ int a; int b; ... }global;
Is the performance slower? does it take more code space? Is there any other drawback?
Thanks.
/Wang
Performance maybe not be an issue. Note however that if you place variables in a struct, their order in memory is guaranteed (b will follow a in this case).