I've tried Googling this, and there are so many answers based on various specific situations that frankly I'm more stuck than I was when I started.
The facts are these:
- Language: C/C++
- OS: Windows
- IDE: Visual Studio 2005
- I'm trying to create a directory from a function in my program, using CreateDirectory (after a #include of windows.h).
- Supposedly, the first parameter (a path) should be a char*. However, when I try to compile, I get the following error: error C2664: 'CreateDirectoryW' : cannot convert parameter 1 from 'char *' to 'LPCWSTR'
- What I've read is that I have some sort of issue between UNICODE and ANSI. The solutions vary wildly and I'm afraid of breaking something important, or doing something very stupid.
- I am perfectly willing to use any other method of creating a new directory, if one exists without me having to find some other library.
- I only minored in comp sci, and frankly I have no idea why it's so easy to open, close, edit, and otherwise access files through stdio, but doing anything with directories (specifically making them and finding out if they exist) is a wild goose chase through the streets of the Internet.
Please help me, either to fix the current attempt at CreateDirectory or to use something else to create a directory.
Thank you!