If you want to convert from std::wstring to const WCHAR* (i.e. the returned pointer gives read-only access to the string content), then calling std::wstring::c_str() method is just fine: std::wstring wstrProcToSearch; std::wcin >> wstrProcToSearch…
807down vote string? wstring? std::string is a basic_string templated on a char, and std::wstring on a wchar_t. char vs. wchar_t char is supposed to hold a character, usually a 1-byte character. wchar_t is supposed to hold a wide character, and then,…