I want to run a loop, which will open all the files in folder and perform some operations on them. However, when I try to pass
"*.*"
in
stream.open()
, it doesn’t open any file. ( is_good() returns false )
fstream stream;
stream.open("*.*", fstream::out);
Use something like
dirent.hor boost’s FileSystem Api to find out all the files in the directory*.*and store them in anstd::vectoror something. And then loop over the vector and open all of the files.