Code:
file.open (pFileName, std::fstream::in);
if (file.fail())
{
cout << "*pFileName: ";
for ( int i =0; i <= 7; i++) {
cout << pFileName[i]; // name is good
}
cout << endl;
std::cerr << "Could not open >" << pFileName << "<\n"; // so is this
std::cerr << "Error=" << std::strerror(errno) << "\n"; // #include <cerrno>
AbortTranslation(ac);
file.clear();
}
New updated test code above: results are
*pFileName: WOLF.PAS
could not open >WOLF.PAS<
Error=no such file or directory
*** Fatal translator error: failed to open source file
I even copied the WOLF.PAS file into the same directory as the exe
file was in.
I've added exec file parameters many times before in Code::Blocks and DevC++ and never had any problems running the exe with filenames.
This is strange!!!!