I use Visual C++ and I have this code as a member function of a class I created:
In the analize.dat file there is a path to an application and m_AppPath is an array of 100 char.PHP Code:ifstream DatFile("C:\\analize.dat");
DatFile.get(m_AppPath,100);
DatFile.close();
The problem is that the program works well when I compile it in the Debug mode, but give me a system error when I run the version compiled in release mode.
The program compiled in the release mode works well if I assign directly a value to m_AppPath, for example:
Does someone know why the first code work only in debug mode ?PHP Code:ifstream DatFile("C:\\analize.dat");
DatFile.get(m_AppPath,100);
DatFile.close();
m_AppPath="C:\\dir\\app.exe";
Thanx




Reply With Quote