C++如何获取exe执行的路径
https://blog.csdn.net/qq_40544338/article/details/103853591
#include <windows.h>
char buffer[MAX_PATH];
GetModuleFileName(NULL, buffer, MAX_PATH);
std::string exePath(buffer);
std::string exeDirectory = exePath.substr(0, exePath.find_last_of("\\/"));
std::cout << "Current executable path: " << exeDirectory << std::endl;