Microsoft KB Archive/93591

= DOC: strstream Constructor Documented Incorrectly =

Article ID: 93591

Article Last Modified on 7/5/2005

-

APPLIES TO


 * Microsoft Visual C++ 1.0 Professional Edition
 * Microsoft Visual C++ 1.5 Professional Edition
 * Microsoft Visual C++ 1.51
 * Microsoft Visual C++ 1.52 Professional Edition
 * Microsoft Visual C++ 2.0 Professional Edition
 * Microsoft Visual C++ 2.1
 * Microsoft Visual C++ 4.0 Standard Edition
 * Microsoft Visual C++ 4.1 Subscription
 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q93591



SUMMARY
The online help for all versions of Microsoft Visual C++ contains the following, incorrect statement in the strstream class constructor description:

The second constructor makes an strstream object out of the first nLength characters of the psc buffer.

The reference to the &quot;psc&quot; buffer should be to the &quot;pch&quot; buffer, which is listed as the first parameter to the second strstream constructor (shown below).   strstream( char* pch, int nLength, int nMode ); The incorrect statement also appears in the Microsoft C/C++ &quot;Class Libraries Reference&quot; manual for version 7.0 and in the the Microsoft Visual C++ &quot;Reference Volume III&quot; manual for Visual C++ version 1.0.

MORE INFORMATION
The strstream object is defined with two constructors. The first constructor creates a strstream object that uses an internal, dynamic buffer which is initially empty. This is the default. The second constructor accepts three parameters: pch, nLength, and nMode. Based on the stream creation mode, nMode, it creates a strstream object from the first &quot;nLength&quot; characters of the &quot;pch&quot; buffer.

For more information on the strstream object, consult the &quot;iostream Reference&quot; in the Visual C++ version 4.0 Books Online.

Additional query words: constructer

Keywords: kblangcpp kblangc kbdocerr kboldocs KB93591

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.