I'm new to using Visual Studio
and need to compile an application but I'm getting the error: error C2440: '=': cannot convert from 'const char *' to 'LPCWSTR'
on line:
std::string open_file_dialog(
std::string title,
std::string filter)
{
char filename[MAX_PATH];
OPENFILENAME ofn;
ZeroMemory(&filename, sizeof(filename));
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = NULL;
ofn.lpstrFilter = filter.c_str();
ofn.lpstrFile = filename;
I believe it might have to do with my project settings as the source code I am looking at should compile as it is. However, I'm not 100% sure. Can anyone help me out here?