I'm trying to create a vector of ofstreams..
vector<ofstream> streams;
for (int i = 0; i < numStreams; i++){
ofstream out;
string fileName = "text" + to_string(i) + ".txt";
output.open(fileName.c_str());
streams.push_back(out);
}
This code will not compile.. specifically the last line where I attempt to add the ofstream to my vector is generating an error. What am I overlooking?