Hi guys.
i was wondering, is there a way to open a stream to an unknown file or files.
for eg. i normally use,
ifstream in("some directory/only_this_file. txt");
// do something to the input
in.close();
ofstream out ("another dirctory/only_that_file. txt");
//write to file
out.close();
but say i wanted to do that to a whole directory of files of unknown names, are there wild characters that will let the program run through the whole directory and do the same operations on all the files?
Ps. Not worried about the loop to run through a directory.
thanks
bruce
i was wondering, is there a way to open a stream to an unknown file or files.
for eg. i normally use,
ifstream in("some directory/only_this_file. txt");
// do something to the input
in.close();
ofstream out ("another dirctory/only_that_file. txt");
//write to file
out.close();
but say i wanted to do that to a whole directory of files of unknown names, are there wild characters that will let the program run through the whole directory and do the same operations on all the files?
Ps. Not worried about the loop to run through a directory.
thanks
bruce
Comment