// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <fstream>
#include <string>
#include <vector>

using namespace std;

int main()
{
    vector<string> all;
    ifstream f("sort.dat");
    while(!f.eof() && f)
    {
        string line;
        getline(f,line);
        all.push_back(line);
    }
    sort(all.begin(),all.end());
    for(int i=0;i<all.size();i++)
    {
        cout << all[i] << endl;
    }
    return 0;
}
