[try Beta version]
Not logged in

 
how to read files from the subdirectories

Jul 22, 2012 at 11:37am
Hi all!>.

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

Thank you.
Jul 22, 2012 at 11:40am
fstream f("path",mode);

in basic language you can use \subfolder name,but not sure about here.Never tried that.
Jul 22, 2012 at 12:33pm
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.
Jul 22, 2012 at 1:11pm
Use chdir() to change current working directory, it should work in both windows and linux.
Jul 22, 2012 at 1:55pm
yeah modoran is correct.use chdir()
Jul 23, 2012 at 10:05am
THanks all.
Topic archived. No new replies allowed.