I have 3 classes in different files:
X
|
-------
| |
Y Z
I will be creating several objects of inherited classes Y and Z.
A specific function in class Z should be executed only if some flag variable is set by class Y.
Where should I create this flag variable (which class) and what should be the declaration be like (static/extern)?