Я открываю двоичный файл, чтобы написать следующим образом: < /p>
Код: Выделить всё
wwBool myClass::Open(char* pFileName)
{
m_pfileHandle = fopen(pFileName, "wb");
}
< /code>
pFileNameHowever, I am getting Invalid Argument error in this code.
If I put the filename manually in a string buffer and pass it to fopen like below:
wwBool myClass::Open(char* pFileName){
char tempFile[MAX_PATH];
wsprintf(tempFile, "%s", ".\\data\\filename.ext");
m_pfileHandle = fopen(tempFile, "wb");
}
< /code>
it could open the file to write.
What am I doing wrong?
Подробнее здесь: https://stackoverflow.com/questions/246 ... ment-error
Мобильная версия