Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

strstream.h & strfile.h in UNIX

Posted on 1999-01-25
5
Medium Priority
?
389 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 100 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying 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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

926 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