If i write
ofstream log(TEXT("С:\\TEST\\log.txt"),ios::app); Then it will work for me only if instead of the system disk (C) there is any other. Create directory via
CreateDirectory(TEXT("C:\\TEST"), NULL); it turns out easily. But the file itself to create somewhere on the C drive does not work. It is desirable for me to implement this somehow through ofstream.