Open Directory and reading Files using C++

Hi I have C++ code to open the directory and read all the files in that directory. It works fine if i specify the absolute path but not working when i specify relative path. i am compiling it in windows and the compiler is Microsoft Visual Studio. Please help me.

Thanks in advance,

Sam
Probably either because the function can't accept a relative path, or because the relative path isn't what you think it is.

I try to use absolute paths for things whenever it makes sense for this very reason.

Anyway.. if you need an absolute path, you can use GetCurrentDirectory() and just append your relative path to the end of it.
Topic archived. No new replies allowed.