私は使用Visual Studio
するのが初めてで、アプリケーションをコンパイルする必要がありますが、エラーが発生 error C2440: '=': cannot convert from 'const char *' to 'LPCWSTR'
しています: オンライン:
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;
私が見ているソースコードはそのままコンパイルする必要があるため、プロジェクトの設定に関係している可能性があると思います。ただし、100%確実ではありません。誰か助けてくれませんか?