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.