United States |
Deriving_a_user_class
If you derive your own class from the ios class, or from one of its derived classes, the ios sub-object must be properly initialized during instantiation. Specifically, you must ensure that the streambuf pointer within the ios sub-object is valid. To do this, you can specify the ios(streambuf *) constructor as a member initializer for your class constructor. Optionally, you can call the ios::init(streambuf *) member function.
|