// This program creates a file of integers between 0 and 999. #include #include #include int main(int argc, char **argv) { if (argc < 3) { cerr << "Usage: make_ints filename length" << endl; return 1; } ofstream outfile(argv[1]); timeval tv; gettimeofday(&tv, NULL); srand(tv.tv_usec); outfile << argv[2] << endl; for(int i = 0; i < atoi(argv[2]); i++) outfile << rand() % 1000 << endl; outfile.close(); return 0; }