I need help with my log file. Every time I run the tool currently it gives logs on the same file, I need to add a code which can help me create a new file each time the connection is made. Help would be extremely appreciated.
_mkdir(Path.c_str());
std::string FullFileName;
FullFileName.append(Path);
FullFileName.append(FileName);
::_sopen_s(&m_FileHandle, FullFileName.c_str(), _O_CREAT | _O_WRONLY | _O_BINARY, _SH_DENYWR, _S_IREAD | _S_IWRITE);
return m_FileHandle != -1 ? ::_lseek(m_FileHandle, 0, SEEK_END) : -1;