CodePudding user response:
File exists? Try using absolute path? Or./Student. Dat directly into Student. Dat?Again failed DWORD er=GetLastError (); Look at what is the error code
CodePudding user response:
Do not recommend using relative paths, this will cause a lot of uncertain problems!!!Use absolute paths!!!!!!!!!!
CodePudding user response:
GetModuleFileName application path, plus the file name, a better approachCodePudding user response:
Is not supported./pathUse the standard "\ " or the full path
CodePudding user response:
The first, both please try to use ". \ \ "to specify the path from the rootThe second, I have remember CFile Open have a CException when fail, both please use CException to know the reason
CodePudding user response:
The file path should be https:\\bbs.csdn.net\\topics\\392564497 this format instead of AAA/VVV/CodePudding user response:
Should be a low-level mistakes, create a file, if in a block of code, do not need to open again, because the file is open, if the other block, in createfile piece, need to close (fp), otherwise the file has been occupied by the fast, other block can't openCodePudding user response:
Create a file, do not need to open again