Last active
March 5, 2020 09:45
-
-
Save Jacob-Tate/14c00152dd7b32497b1e13442afe545c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assuming unicode | |
#include <string> | |
wchar_t path[FILENAME_MAX] = { 0 }; | |
GetModuleFileNameW(nullptr, path, FILENAME_MAX); | |
std::wstring wide_string(path); | |
std::string result_string(wide_string.begin(), wide_string.end()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment