SDL Not Accepting Relative Paths

I'm trying to load a .bmp with SDL and everything works fine if I save it in the root. The file is blitted and is usable. However if I place it in a folder that's in the root and specify it's location with something like

image = SDL_LoadBMP("/images/picture.bmp");

it will always return a NULL pointer. My question is, what's up with that? What am I doing wrong? I've pasted the bloody folder everywhere in hopes of finding the correct location, but it seems unless it's explicitly in the root or has a full path it won't load.

I'm using Visual Studio 2010 Express if that helps.

Thanks in advance.
Don't start your paths with a '/' character. I think that tell it to start in the root directory (like the actual root directory, not your program directory).


ie:
1
2
"/images/picture.bmp"  ==  "C:/images/picture.bmp"
"images/picture.bmp" == "C:/path/to/your/program/images/picture.bmp"
I feel like an idiot.

Thanks a lot Disch!
Topic archived. No new replies allowed.