Solved

strstream.h & strfile.h in UNIX

Posted on 1999-01-25
5
372 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
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 how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now