-1

when I start learning texture, I found that the img won't load when I use relative_path,but ABS_path would work. but the codes on docs use relative_path

I open the file with ifstream,and relative_path still didn't work(debug onVscode)

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • You need to set the working directory to the place you want paths to be relative from. If you are running inside an IDE there is likely an option to do so. You could also search for how to find the path to the currently running executable and set the working directory inside the program itself to where you want. – Retired Ninja Aug 28 '23 at 03:17

0 Answers0