How to open a file from appdata on c++ [closed]

  appdata, c++

I want open a file from appdata folder, i have path of file, but no matter where is file, i can’t open it. But normal file I have create on my desktop it’s work. I think txt file in appdata is safe ? I have try to move file on my desktop, but same things, I can’t open it. If someone have solution, thank you.

std::ifstream f(logsPath.c_str());

if (f.is_open()) {
    std::cout << f.rdbuf();
else {
    printf("Can't open latest logsn");

Source: Windows Questions C++