home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 13
/
amigaformatcd13.iso
/
-in_the_mag-
/
html_tutorial
/
fstream.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-03-07
|
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) { }
};