G
Gary Wessle
hi
I have a code, the part which is troubling goes like this
****************************************************************
#include <istream>
#include <ostream>
#include <fstream>
using std::ifstream;
using std:fstream;
....
ifstream ifs(f_name.c_str());
if( ifs.is_open() )
cout << "is open" << endl;
else
cout << "closed" << endl;
....
when run into the debugger "gdb" it shows "closed", however it prints
"p f_name" fine and if I take that and copy it to the command line
"cat /full/path/to/file" it prints out. the permission on that file is
-rw-r--r--
many thanks
I have a code, the part which is troubling goes like this
****************************************************************
#include <istream>
#include <ostream>
#include <fstream>
using std::ifstream;
using std:fstream;
....
ifstream ifs(f_name.c_str());
if( ifs.is_open() )
cout << "is open" << endl;
else
cout << "closed" << endl;
....
when run into the debugger "gdb" it shows "closed", however it prints
"p f_name" fine and if I take that and copy it to the command line
"cat /full/path/to/file" it prints out. the permission on that file is
-rw-r--r--
many thanks