There's ultimately a limit to anything. Files are a perfect example of something managed by the operating system, and you will have to consult your OS documentation for the specific limit. In Linux, I believe it is configurable in the kernel. There may additionally be user and process quotas.
I don't think 200 is too many to ask.
It's quite simple to try and see. Just write a program that keeps opening more files until you get an error.
Live example.
On Mac OS X 10.8, this program
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
int main() {
int i = 0;
std::ofstream *f;
do {
f = new std::ofstream( std::to_string( i ++ ) );
} while ( * f << "hello" << std::flush );
-- i; // Don't count last iteration, which failed to open anything.
std::cout << i << '
';
}
Produces the output 253
. So if you're on a Mac, you're golden :) .
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…