26.12.2012, 12:26
I know that having many macros affects the compile time. I also know that literals are faster than variables. But I honestly doubt it would have any effect at runtime if you chose to use constant variables.
In any case, using const instead of new is better if you know that the value of the variable is never to change. There are also instances where macros cannot be used. For example declaring a large array of floats.
As for keeping track of dialog ids, I use an enumerator. Guaranteed to never have a duplicate id.
In any case, using const instead of new is better if you know that the value of the variable is never to change. There are also instances where macros cannot be used. For example declaring a large array of floats.
As for keeping track of dialog ids, I use an enumerator. Guaranteed to never have a duplicate id.