vector<string> data;
string line;
for (ifstream ifile(argv[1]); getline(ifile, line);)
data.push_back(line);
sort(begin(data), end(data));
copy(begin(data), end(data), ostream_iterator<string>(ofstream(argv[2]), "\n"));
And his `return 0` was superfluous so I removed it. copy(sort(data), ...)
but alas we cannot. int[][int] whatever;
? Because I think we should be getting an array out whenever we do whatever[1]
and not just an int.
And if your company won't let you upgrade compilers, then it certainly won't let you switch languages altogether.