🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.help
Article #221

Need help on class fstream (can't find any doc)

#221
From: Jason Rosenberg
Date: Tue, 08 Sep 1992 10:54
26 lines
1456 bytes
Hello,

I have been playing around with the class fstream in the g++ library.  I
am trying to understand its intended usage and how best to use it.
I was unable to find any documentation about it.  

The open method returns a void.  What is the best way to test if the open
operation was a success.  So far, I have only been able to successfully
use the filedesc() method, to test if it is not -1.  Is there any other
way?

I am trying to create a derived stream class that can be assigned freely
to cout,cin and cerr, and to read and write to files.  So far, fstream
is the only "base" class I can use from the g++ library.  However,
I have not been able to get it to work (see my bug report post on
gnu.g++.lib.bug).

Thanks for any help.....

Jason


-- 
Jason Rosenberg                           Computer Science Department
jason@cs.ucla.edu                         University of California
{uunet,rutgers,ucbvax}!ucla-cs!jason      Los Angeles, CA  90024
Technical Details
Message-ID: <1992Sep8.105412.29887@cs.ucla.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.claremont.edu!ucivax!ucla-cs!lanai.cs.ucla.edu!jason

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.help
Path: arc1-ca.pugleaf.net!sparky!uunet!news.claremont.edu!ucivax!ucla-cs!lanai.cs.ucla.edu!jason
From: jason@lanai.cs.ucla.edu (Jason Rosenberg)
Subject: Need help on class fstream (can't find any doc)
Message-ID: <1992Sep8.105412.29887@cs.ucla.edu>
Originator: jason@lanai.cs.ucla.edu
Sender: usenet@cs.ucla.edu (Mr Usenet)
Nntp-Posting-Host: lanai.cs.ucla.edu
Organization: UCLA Computer Science Department
Date: Tue, 8 Sep 92 10:54:12 GMT
Lines: 26