Solved

strstream.h & strfile.h in UNIX

Posted on 1999-01-25
5
376 Views
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!
0
Comment
Question by:hott
  • 2
  • 2
5 Comments
 
LVL 86

Expert Comment

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

Expert Comment

by:nietod
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?
0
 
LVL 86

Expert Comment

by:jkr
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'...
0
 

Accepted Solution

by:
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 );
0
 
LVL 22

Expert Comment

by:nietod
ID: 1185113
I had already suggested that....
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

772 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