I need to use the mkdir c++ function in VS 2008 which takes two arguments and is deprecated from VS 2005.
However this function is used in our code and I need to write a standalone product (containing only mkdir function) to debug something.
What header files do I need to import? I used direct.h, however compiler complains that the argument does not take 2 arguments (reason for this is the function was deprecated in VS 2005).
mkdir("C:\hello",0);
If you want to write cross-platform code, you can use
boost::filesystemroutinesThis does add a library dependency but chances are you are going to use other filesystem routines as well and
boost::filesystemhas some great interfaces for that.If you only need to make a new directory and if you are only going to use VS 2008, you can use
_mkdir()as others have noted.