There's no standard, portable way to do this. Like ghostbusters, you're not supposed to cross the streams. But g++ iostreams do have some extensions to make it possible. Adapting an example found here I tried this:
Testing this on a file containing 'asdf' it does print asdf, so while a bit tortuous it does actually work. It being that tortuous also makes it plain that you are using an extension, which is probably the point...
I don't know if the stdio_filebuf closes the FILE * for you when it goes out of scope or not.
Hi all,
i wanted to port some HP-UX code to linux. can anybody point to some documents or resources that would help me in doing the porting..
thanks in advance
Arun Prakash (0 Replies)
Gents,
i'm a senior applications developer and need to port a Linux server application ( no additional / special libraries or unique header files ) to a HPUX enviroment.
Any chance to compile it on the Linux using flags to create an HPUX binary with gcc? (8 Replies)
helo,
i m porting HP-UX socket application to Linux SSL-socket application.
I have use htonl() in HP-UX.
so when i use it in Linux, data transf is not done and application become soem time crashed.
now when i remove htonl() in linux, then i got data but it will not proper order or some data may... (1 Reply)
Hello All,
I have a code of DHCP which is implemented on Linux. During porting this code from Linux to VxWorks, I come up with following errors:-
jects\freedom\ap\udhcp\socket.c
C:\projects\freedom\ap\udhcp\socket.c: In function `read_interface':
C:\projects\freedom\ap\udhcp\socket.c:79:... (1 Reply)
I am new to Linux programming and my work involves changing an abstraction layer which made Nucleus calls, to Linux calls.
In Case of Events Nucleus has calls like
NU_Set_Events()
NU_Retrieve_Events()
Can I use the POSIX thread conditional variables for Linux?
Can I use the System V calls... (1 Reply)
Hi,
I was trying to port efs_mount(OSE system call) to a LInux.The efs_mount function is used to mount a volume on the indicated device dev.Upon successful completion of this OSE sytem call a volume manager (VM) will be available through which files on this volume are accessed. The Syntax for... (4 Replies)
Hi all,
Has anyone experience with proting a Linux driver (C-code) to Solaris 10?
I have a Sunix SATA card with a inicio1622 chipset, but no driver available. From the website of inicio I downloaded the drivercode for Linux 2.4.
Having done some investigation I found a Solaris driver... (4 Replies)
Hi,
Code written in C++ got compiled successfully using Sun 4.2 Compiler on Solaris 6. As part of migration, i am using same code and trying to compile using Sun 5.8 C++ compiler(Sun Studio11) on Solaris 10 and could not compile the below line,
outStr.attach(1); // here outStr is declared... (1 Reply)
Discussion started by: shafi2all
1 Replies
LEARN ABOUT X11R4
iostream
FBB::IOStream(3bobcat) std::istream and std::ostream FBB::IOStream(3bobcat)NAME
FBB::IOStream - Combines std::istream and std::ostream features
SYNOPSIS
#include <bobcat/iostream>
Linking option: -lbobcat
DESCRIPTION
This class combines the features of the std::istream and std::ostream classes. The std::istream and std::ostream may be physically differ-
ent streams. FBB:IOStream objects may, e.g., be associated with streams wrapped around pipes (see, e.g., FBB::IfdStream and FBB::OFd-
Stream), to construct bi-directional pipes.
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
INHERITS FROM
FBB::IOStreambuf (private inheritance),
std::istream,
std::ostream
CONSTRUCTORS
o IOStream():
The default constructor constructs an empty FBB::IOStream objects. It should not be used before its open member (see below) was
called.
o IOStream(std::istream &in, std::ostream &out):
This constructor associates the IOStream object with a std::istream and a std::ostream. All output operations will be passed on to
the std::ostream, all input operations to the std::istream. The streams passed to IOStream should outlive the IOStream object. This
constructor performs the actions of the default constructor and then calls the IOStream::open member De copy constructor is avail-
able as well.
MEMBER FUNCTIONS
All members of std::istream and std::ostream are available, as FBB::IOStream inherits from these classes. Furthermore, when switching
between std::istream and std::ostream operations, no intermediate seekg() or seekp() operation will normally be required, since the base
classes will normally be associated with physically different streams.
o void open(std::istream &in, std::ostream &out):
This member (re)associates the IOStream object with a std::istream and a std::ostream. All output operations will be passed on to
the std::ostream, all input operations to the std::istream. The streams passed to IOStream() should outlive the IOStream object. If
this member is called for an IOStream object already associated with an std::ostream object, the already associated std::ostream
object is flushed before setting up the new association.
o void clear():
This member clears the error states of the associated std::istream and std::ostream objects.
EXAMPLE
See the example provided with process(3bobcat).
FILES
bobcat/iostream - defines the class interface
SEE ALSO bobcat(7), ifdstream(3bobcat), iostreambuf(3bobcat), ofdstream(3bobcat), process(3bobcat)BUGS
None Reported.
DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature;
o bobcat_3.01.00-x.tar.gz: source archive;
o bobcat_3.01.00-x_i386.changes: change log;
o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;
BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.
COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL).
AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl).
libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::IOStream(3bobcat)