how to read files from the subdirectories

Hi all!>.

I have having trouble again to open the files that are saved in sub directories of my project..Pls assist.

Thank you.
fstream f("path",mode);

in basic language you can use \subfolder name,but not sure about here.Never tried that.
Thanks Akshit... I know that.. But I am having problem in C++.... Secondly, Is there any way to define the directory as permanent?? Suppose I want to read and write the files from the same subfolder time and again so I need to define the directory for the program so that it can know where the files are located.
Use chdir() to change current working directory, it should work in both windows and linux.
yeah modoran is correct.use chdir()
THanks all.
Topic archived. No new replies allowed.