Untitled
unknown
plain_text
2 years ago
678 B
13
Indexable
#include <iostream>
#include <Windows.h>
#include <ShlObj.h>
#include <string>
std::wstring GetSaveFilePath() {
PWSTR localAppDataPath;
if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &localAppDataPath))) {
std::wstring saveFilePath = std::wstring(localAppDataPath) + L"\\Growtopia\\Save.dat";
CoTaskMemFree(localAppDataPath);
return saveFilePath;
}
return L"";
}
int main() {
std::wstring filePath = GetSaveFilePath();
if (!filePath.empty()) {
std::wcout << L"Dosya yolu: " << filePath << std::endl;
} else {
std::wcout << L"Dosya yolu bulunamadı." << std::endl;
}
return 0;
}
Editor is loading...