home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 8
/
amigaformatcd08.iso
/
in_the_mag
/
html_tutorial
/
fstream.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-09-03
|
450b
|
27 lines
// Faked fstream to use less memory
class ofstream : public ostream {
public:
ofstream(char name[], ios::Selector);
bool fail();
protected:
private:
FILE *the_stream;
};
ofstream::ofstream( char name[], ios::Selector ) :
ostream( the_stream = fopen( name, "a+" ) )
{
}
bool ofstream::fail()
{
return (bool) (the_stream == NULL);
}
class ifstream : public istream {
public:
ifstream(char name, ios::Selector ) : istream(NULL) { }
};