I'm trying to write a program that opens files from a disk without already knowing the filenames or having the user input the filenames. I do not know how to open files without knowing the exact filename and using syntax such as:
in_stream.open("C078C75D.DAT");
out_stream.open("newC078C75D.DAT", ios::app);
Also, I only know how to open files that are in the same location as my program's source file (.cpp file). I would like to know how to open files from the floppy drive while my program is in another drive, such as the C-Drive.
I am hoping to find out how to do these things in order to complete a project given to me for my engineering internship. Any help would be greatly appreciated!
in_stream.open("C078C75D.DAT");
out_stream.open("newC078C75D.DAT", ios::app);
Also, I only know how to open files that are in the same location as my program's source file (.cpp file). I would like to know how to open files from the floppy drive while my program is in another drive, such as the C-Drive.
I am hoping to find out how to do these things in order to complete a project given to me for my engineering internship. Any help would be greatly appreciated!