Can someone send me a snip of a code where I can manage folders in windows

People (from several forums) recommended using the function CreateDirectory. I had tried it but whenever I try to compile it it does not recognize it. So I am not sure what kind of header(s) should I include to get rid of the error.
error C3861: 'CreateDirectory': identifier not found

I tried to include <windows.h> but I got tons of errors so I removed it. Any idea how to resolve this simple issue with CreateDirectory function An example of code or a link to a code illustrating that will be great.

Also, is there a better approach to deal with folders in VC++ Please any tips will be highly appreciated.


Re: Visual C++ Express Edition create folders in VC++


System::IO::Directory::CreateDirectory( "myNewDirectory" );

To get the compiler to recognize CreateDirectory by itself, you have to add:

using namespace System::IO::Directory;

Re: Visual C++ Express Edition create folders in VC++


You'll have to choose which API you are going to use. If you want to use Windows' CreateDirectory(), you'll have to install the Platform SDK and #include <windows.h>. If you want to use the .NET framework (which is what you're supposed to do with the Express edition), you'll have to write a managed program and use System::IO::Directory::CreateDirectory().

Eek: MSFT has removed the PDSK installation instructions from their web site. Wonder what that means. Here is the cached version from Google.