Originally Posted by
tuli
1)
I have a larger project here. It mainly consists of one window and a set of classes. At runtime, the class instances have to know about each other, ie class instance A might somehow use the class instance B, with which it is associated. I have simply wrapped all classes in one "Instance" class, and have declared a global function, which returns a pointer to the "Instance" class and thus allows the classes to use each other.
This works well as "Instance" is a singleton.
Now, however, i want to launch two windows in my program and would thus need TWO instances of the "instance" class!
The concept fails. (ok, it wasnt pretty anyways...)