Mail Archives: djgpp/1997/12/28/22:46:16
Thomas Demmer wrote in message <34A69420 DOT FABC7F0 AT LSTM DOT Ruhr-UNI-Bochum DOT De>...
>BTW, this code looks like C++, so once your at it, why not use
>the stream functions? Although this is just aesthetic and you'll
>hit the same problem there (and maybe others...)
Well just the variable initialization (which of course is now how I went at
it in the actual source), but as a matter of fact, yes, I have run into
extreme problems with the fstream class, when reading from a file, it would
allow me to open a file, would register an error, such as
ofstream In;
char buf[10000];
In.open ( "wow.txt" );
if ( !In )
{
cout << "Error!";
exit ( 1 );
}
while ( In >> buf )
{
// do stuff
}
In.close();
It would open correctly, but it would register that the file had nothing in
it, of course this was for school, so I just used their VC++ and it worked
fine (the same exact code). I would have posted that problem as well, but I
don't have any use for the fstream, so I didn't think about posting it.
(and here are my versions
bnu27b
djdev201
gcc2721b
gpp2721b
lgp271b
and I do believe they are the most recent)
-Steve
- Raw text -