Aug 18, 2015 at 7:09am UTC
Hi dear friends,
I run my program under gcc compiler in ubuntu.
It issues error:
Assertion `appFile.is_open()' failed.
Some part of my code is:
void NoximMasterPE::loadApplication(string Folder, int index)
{
string line;
ifstream appFile(Folder+"/App.inf"); // ***error come from here***
string appName = Folder.substr(Folder.find_last_of('/') + 1);
NoximIndexConverter indConv;
NoximApplication *app = &AppSet.Application[index];
app ->name = new char[appName.size()];
app ->name = appName;
cout << "test1" << "\n";
assert(appFile.is_open());
while(appFile.eof() == false)
{
appFile >> line;
.
.
....
-------------------------------------
I would highly appreciate it, if you help me.
Really thanks in advance.
Mohammad.
Aug 18, 2015 at 8:11am UTC
File cannot be opened. Try debug that part of code and see if path to file is correct. If it is then you coud have not permissions to open file/file is already open in other program etc.