From: Axel V. <kei...@gm...> - 2001-03-20 17:04:33
|
Dear all, First, I want to say thank you very much for MinGnuWin! Perfect idea and realisation! Now, I am not quite sure, whether this is the right place to report, but = I did not find anything else. Following code using mingw produces a segmentation fault: test.cpp: =3D=3D=3D=3D=3D=3D=3D=3D=3D #include<iostream> #include<fstream> #include<string> using namespace std; int main(void) { fstream file; file.open( "testfile.txt" ,ios::in | ios::nocreate); if (!file.good()) return 0; string token; file>>token; //THIS PRODUCES A SEGMENTATION FAULT file.close(); return 1; } with testfile.txt: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D a_string or_something_else I am using g++ 2.95.2-6 from www.cygwin.com and mingw 0.3. Compile command is: g++ -I. -L. -mno-cygwin test.cpp (Where '.' contains all related files for mingw) Do you have any comment or idea? thank you very much in advance for your = help. Best regards, Axel _______________________________________________________________________ Axel Volkwein Tel: +41 1 63 33562 / / / Institute of Structural Engineering Fax: +41 1 63 31044 /__ /__ ETH H=F6nggerberg - HIL E22.3 www.ibk.baug.ethz.ch / / / /\ CH-8093 Z=FCrich vol...@ib... / /__/ / \ |