a bug in mingw
//this shows that the older version of mingw32 can be better than the newer one #include <iostream.h> #include <fstream.h> #include <conio.h> main() { //the string should be written two times if the file exists ifstream xyz; char chr; xyz.open("a.bat"); while(xyz.get(chr)) cout<<chr; //INFO: it always works xyz.close(); xyz.open("a.bat"); //on the newer version, the file is not opened while(xyz.get(chr)) cout<<chr; //INFO: it works on the older version ONLY getch(); //newer version 3.4.2 (Dev-Cpp 4.9.9.2) //older: 2.95.3-6 (Dev-Cpp 4.9.6.0) //parameters: //older version: d:\progra~1\dev-cpp\bin\g++.exe "bug.cpp" -o "bug.exe" -s //newer version: d:\windows\dev-cpp\bin\g++.exe "bug.cpp" -o "bug.exe" -s //Sławomir N., Poland } /* [EMAIL PROTECTED] */ // probably the xyz.close() function does not work corectly