FindFirstFile() and std::string
When I compile the following bit of code in VC++ 2008, I get the error, "error C2664: 'FindFirstFileW' : cannot convert parameter 1 from 'const char *' to 'LPCWSTR'"
The same code would work in VC++ 6, where FindFirstFile took a LPCTSTR, and not a LPCWSTR. Casting to a LPCWSTR doesn't do the trick, so how do I make this work?
path = "C:\\*.*";
hFind = FindFirstFile(path.c_str(), &data);
Thank you in advance.