If I run the following program, only 509 files are created. In fact, I don't seem to be able to have more than 509 filestreams open at a time. If I delete file
inside the loop, all 1000 files are created. Is there any way to have more than 509 filestreams open at a time? I'm running Windows.
int main(int argc, char** argv) {
for(int i = 0; i < 1000; ++i) {
std::ofstream *file = new std::ofstream("files/"+i+".txt");
}
return 0;
}