05-12-04 03:38 PM
Can anyone verify this bug for me?
<Code>
#include <iostream>
#include <fstream>
using namespace std;
int main(void)
{
ofstream outfile;
outfile.open("data.txt", ios::out);
outfile.close();
}
</Code>
Attached is the data.txt. When run, the data.txt file is zeroed-out
(has zero length).
Here are my versions numbers:
[sgray@sgray-pc]$ uname -a
Linux sgray-pc 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386
GNU/Linux
[sgray@sgray-pc]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --host=i386-redhat-linux --with-system-zlib
--enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Thanks,
Stephen
[ Post a follow-up to this message ]
|