От: | удусекшл | ||
Дата: | 03.02.22 13:53 | ||
Оценка: |
if (!appConfig.outputFilename.empty())
{
std::string openMode = "w";
if (!appConfig.getOptOverwrite())
openMode.append("x"); // This flag forces the function to fail if the file exists, instead of overwriting it.
cout<<"try to create file '" << appConfig.outputFilename << "', open mode: '" << openMode << "'" << endl;
errno = 0;
std::FILE* pFile = std::fopen( appConfig.outputFilename.c_str(), openMode.c_str() );
//...
}
try to create file 'test.txt', open mode: 'wx'
The thread 0x4730 has exited with code -1073740777 (0xc0000417).
// Тут ёще куча потоков с тем же кодом завершается