Hi, I have been programming in C for some time and now I am trying my hand at C++.
As we all know, global variables are baaaaad...
However, I am developing a collection of classes and I need them all to share a common variable (a time step) whose value will be defined by the user. As far as my understanding of C++ goes, I could either use a global variable, or my classes could be derived from a "master class" in which this variable is defined as "protected". But I'm sure there must be another, more elegant solution...
Could you please let me have your input on this one?
Thanks in advance
Jose