// 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>

using namespace std;

const int NLINES = 15;

int main(int argc, char *argv[])
{
    string lines[NLINES];
    ifstream inf(argv[1]);
    int ix = 0;
    while(!inf.eof())
    {
        getline(inf,lines[ix]);
        ix = (ix + 1) % NLINES;
    }
    for(int i = ix; i < ix + NLINES; i++)
    {
        cout << lines[i % NLINES] << endl;
    }
    return 0;
}
