strstream.h & strfile.h in UNIX

Posted on 1999-01-25
Last Modified: 2008-02-20
I am porting programs that uses strstream.h and strfile.h in the unix environment. However, they are not available in VC++. Need help to know where I can find replacements for these header files. Thanks!
Question by:hott
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 86

Expert Comment

ID: 1185109
strstream.h is available as 'strstrea.h' (8.3!)
LVL 22

Expert Comment

ID: 1185110
Also there is a strstream file (no .h)   There is no strfile.h.  I don't think that is part of the standard library.  What does it contain?
LVL 86

Expert Comment

ID: 1185111
After taking a look into 'strfile.h', i think th VC++ equivalent is 'io.h' - the functionality is almost identical, my version of this file is a part of 'libio.h'...

Accepted Solution

DOMINIC011899 earned 50 total points
ID: 1185112
Use the header with no 'h' and put the 'using' directive as in:

#include <STRSTREAM>
using namespace std;

   ostrstream osMsg;
   osMsg << "This is it." << ends;
   cout << osMsg.str() << endl;
   osMsg.rdbuf()->freeze( 0 );
LVL 22

Expert Comment

ID: 1185113
I had already suggested that....

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question