I have an application for which GUI is written in C# UWP and accessing the file logic is written in C++ DLL. The DLL should open a file to read data from it. I am trying to access the file from its location. When I call inFile.open("D:\\File\\readFile.txt", ios::in)
the value returned is NULL.
To check if there is any problem with the file path, I have created a console application to access the file using the same way and it worked. What could be the problem?
fstream inFile;
inFile.open(filePath, ios::in);
if (!inFile.is_open())
{
/* Display unable to read file*/
return;
}
/* Perform operation on file */
inFile.close();
Aucun commentaire:
Enregistrer un commentaire