Sunday, July 12, 2009

A C++ header file ???

Hello !





Does anyone know where I can find the definition, I mean, the code, of %26lt;strstream%26gt;, or if at all it can be found ? It's an old C++ header file, with four deprecated classes, but I need it because this thing I am trying to build uses it and it is also old :)





I am not very experienced with this :)





Thanks !

A C++ header file ???
If you have a C++ compiler installed on your machine (like Visual Studio), then the "include" path usually has all the header files. I have Visual Studio myself, so I searched under Program Files\Microsoft Visual Studio 8\VC\Include and found the file there. Y! Answers does not let me attach a file, otherwise I could have given you the file itself.
Reply:It would be part of an older version compiler distribution. I've updated all %26lt;strstream%26gt; code to use %26lt;sstream%26gt; with very little effort. Depending how much its used in your project, maybe that would be easier than finding a now discontinued header.





The difference is that %26lt;strstream%26gt; uses a character array for storage and %26lt;sstream%26gt; uses a std:string for storage. I've always used them for output formatting so all I had to do was change the type and use c_str() to get a usable character array result.
Reply:# include %26lt;iostream.h%26gt;
Reply:I do not quite understand your question.





Did you check this website out below?





http://www.tacc.utexas.edu/services/user...





It has extensive information concerning the class strstream, what it is used for (writing to an array located in memory), and other information.
Reply:Use google code search, the best way to find out about google code search is to google it :)
Reply:strstream is still available in Visual Studio 2005. The class stringstream is part of the STL and should be available to most compilers on most platforms.
Reply:Do you have Microsoft Visual Studio 2005? The latest version (2008 isnt out yet) has access to the MS library which has a lot of the most-used files for programming.





%26lt;strstream%26gt; doesn't sound familiar, if it is old, it might be built into %26lt;string%26gt;
Reply:%26lt;strstream%26gt; translates to strstrea.h


Do a search in your compiler directory for this file.


No comments:

Post a Comment