I been trying to simply make a directory in C++ but I dont get what all these people are talking about and they never put a complete code in there I can use that includes the includes ect. Can you give me a code that will do this simple and straight forward that I can just copy and paste and it will work where all I need to do is change the directory name to what I want it to be please?
Regards and thanks. By the way I did try this and it worked
BUT this doesnt seem like its the best way to simply make a directory even though it works. I dont think there should be an if statement needed for one. I just want to break it down to what is actually needed and I need the whole code including includes. Also I am confused to why I need the printf and the system dir testtemp lines.
Regards and thanks. By the way I did try this and it worked
Code:
#include <direct.h>
#include <stdlib.h>
#include <stdio.h>
int main( void )
{
if( _mkdir( "Directory" ) == 0 )
printf( "Directory '\\testtmp' was successfully created\n" );
system( "dir \\testtmp" );
}
Comment