I have just started learning c++.
I got a simple question, is it possible to open a batch of csv files within a text file format? or is there a way to open the csv files in loop?
Let's say, I have abc.txt and inside contains
123.csv
234.csv
345.csv
456.csv
567.csv
678.csv
734.csv
8qs.csv
9xz.csv
10x.csv
I do know how to open the text file using the ifstream but it just reads the above data.
I guess you only have to split the text you've read with ifstream and then execute it by system(/*blah*/);. To use this feature, you have to include #include <stdlib.h>
Well you need to read in the file names from your abc.txt into a std::string variable and use that to open the csv file:
1 2 3 4 5 6 7
std::string csv_file_name; // read this in from abc.txt
std::ifstream csv;
csv.open(csv_file_name.c_str());
// now read the csv file whose name you read from abc.txt