[Bug c++/22130] New: fstream fails to create a file in ios::in| ios::out mode.

2005-06-20 Thread rohit_goel at ml dot com
fstream fails to create a file in ios::in| ios::out mode.

gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)
environment: 2.4.21-20.ELsmp i686 GNU/Linux

Sample Code:

#include 
#include 
#include 

using namespace::std;
int main()
{
fstream f("test", ios::in|ios::out);
if(!f.is_open())
{
cout<<"could not open test: "<>st)
cout

[Bug libstdc++/22130] fstream fails to create a file in ios::in| ios::out mode.

2005-06-21 Thread rohit_goel at ml dot com

--- Additional Comments From rohit_goel at ml dot com  2005-06-21 13:43 
---
Is there a way to open the file in "a+" mode using fstream.  Meaning, if the 
file exists, open in append mode, else create the file.

Thanks.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22130