ah right, the current_path
link I gave is only C++ 17 onwards. I think you can ask VS for that, but that’s a different issue.
if you want to bypass the issue, just give an absolute path for now. in windows explorer, hold shift while right-clicking on the picture file. you’ll get a hidden menu item called “Copy as path”. that’s the path. you’ll need to turn \
into \\
because C/C++ string literals treat \
special, like "C:\\Users\\User\\Desktop\\picture.jpg"
you can try a little bit of winapi
#include <Windows.h>
...
char buf[MAX_PATH];
int length = GetCurrentDirectoryA(MAX_PATH, buf);
cout << "current directory: " << buf << " (" << length << " characters)" << endl;