Home > Back-end >  C create a file to a custom file name and path
C create a file to a custom file name and path

Time:09-21

How to create a directory in the c + + to define itself to create the location and directory name==

CodePudding user response:

 CreateDirectory (" C: \ \ SdkLog "), NULL); 

CodePudding user response:

Int creatDir (char * pDir)
{
cout <& lt;" The location of the input to create a folder and name: "& lt; cout <& lt;" For example: c: \ \ example "& lt; Cin> PDir;
_mkdir (pDir);
return 0;
}
Write to why I can't always create==

CodePudding user response:

Refer to the MSDN this function is that, in the form of
Int _mkdir (
Const char * dirname
);
It's header file is & lt; Direct. H>
On behalf of the representative is successful, returns 0-1 failed
  • Related