char path[MAX_PATH];
//包含exe
GetModuleFileName(NULL, path, MAX_PATH);
//去掉exe
PathRemoveFileSpec(path);
C++ 获取当前程序路径
最新推荐文章于 2024-07-15 15:38:25 发布
char path[MAX_PATH];
//包含exe
GetModuleFileName(NULL, path, MAX_PATH);
//去掉exe
PathRemoveFileSpec(path);