Load contents in subfolders

Time after time I have wanted to include or
load files from within sub-folders (
\resources\sprites\sun.png for example),
however I can not figure out how to do it.

I have searched Google many times but am
unable to find an answer, guess I'm not a
good searcher.

Anyway, I have tried:
"\resources\sprites\sun.png",
"\\resources\sprites\sun.png",
".\resources\sprites\sun.png",
"/resources\sprites\sun.png"
"resources\sprites\sun.png"

What is the correct way to do this?
in c++ everything that starts with \ is an escape character. use either \\ or / instead.
Are you saying use: "\\resources\\sprites\\sun.png" ?
yes. though maybe "resources\\sprites\\sun.png" is the right one.. or ".\\resources\\sprites\\sun.png" if you want.
Your right it was "resources\\sprites\\sun.png"

man that was obvious! Thanks a ton!!
Topic archived. No new replies allowed.