TCHAR tszExePath[MAX_PATH] = {0}; //定义一个字符数组
GetModuleFileName(NULL, tszExePath, MAX_PATH); //给字符数组赋值
wstring wsTemp = tszExePath; //用字符数组的地址初始化wstring 变量.
wstring wsPath = wsTemp.substr(0, wsTemp.find_last_of(L"//") + 1); // 使用wstring的封装函数.
wcscpy(m_tszCurrentDir, wsPath.c_str()); // 使用wstring的数据.
wstring的简单用法
最新推荐文章于 2025-01-16 09:42:07 发布
1795

被折叠的 条评论
为什么被折叠?



