C++获取appdata路径的方式: SHGetSpecialFolderPath
wchar_t buffer[MAX_PATH]; SHGetSpecialFolderPath(0, buffer, CSIDL_LOCAL_APPDATA, false); // buffer = C:Users用户名AppDataLocal