The Microsoft Input/Output Stream Classes (iostream.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ostream_withassign::operator =
ostream_withassign                          Up Contents Index Back
──The Microsoft iostream Classes────────────────────────────────────────────
 
  ostream& operator =( ostream& ros );
  ostream& operator =( streambuf* sbp );
 
  Remarks
 
  The first overloaded assignment operator assigns the specified ostream
  object to this ostream_withassign object.
 
  The second operator attaches a streambuf object to an existing
  ostream_withassign object, and it initializes the state of the
  ostream_withassign object. This operator is often used in conjunction
  with the void-argument constructor.
 
  Example
 
      filebuf fb( "test.dat" ); // Filebuf object attached to "test.dat"
      cout = &fb;         // fb associated with cout
      cout << "testing"; // Message goes to "test.dat" instead of stdout
 
  See Also
 
  ostream_withassign::ostream_withassign, cout
 
 
                                     -♦-