Something messed up in the following function:

// Открытие файла int FSB_OpenFile(FILE* FDB, const char* adr, const char* mode) { if (!std::filesystem::exists(adr)) return -15; if (fopen_s(&FDB, adr, mode) != 0) return -8; return 0; } 

Call:

 FILE* FDB = NULL; int errorcode; std::string FullAdr = "Полный адресс до файла"; errorcode = FSB_OpenFile(FDB, FullAdr.c_str(), "r"); 

As a result, a file is assigned inside the FDB function, and outside it, the file is still NULL

    1 answer 1

     FSB_OpenFile(FILE** FDB ... ... FSB_OpenFile(&FDB, ... 

    Well, or pass on the link ...