// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main(int argc, char *argv[])
{
   cout << "C++ - " << argv[1] << endl;
   ifstream f(argv[1]);
   string line;
   while(getline(f, line))
   {
      cout << "|" << line << "| " << line.length() << endl;
   }
   f.close();
   return 0;
}
