The class maintains an internal static counter (as a private member) with the number of existing objects.
| 1 2 3 4 5 |
|
Members
- Init(); (constructor)
- Increases the internal static counter by one. If the value of the internal counter was zero, the standard iostream objects are constructed and initialized.
- ~Init(); (destructor)
- Decreases the internal static counter by one. If the value of the internal counter reaches zero, the respective flush member functions of the output standard objects are called so that their buffers are flushed.
