Considerations for ordering variables in C++

Consider the case where your model has variables defined directly in a package. These variables define various constants (such as PI and DEGREES_PER_RADIAN). Some of these variables are defined in terms of others, such that the dependent variable must be declared before the others for the application to compile. However, the product does not allow you to override the default alphabetic order of the variable declarations.

There are at least two ways to solve this problem:


Feedback