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

using namespace std;

int main()
{
   ifstream f("data.dat");
   while(!f.eof())
   {
      string kol1,kol2,kol3;
      getline(f,kol1,',');
      getline(f,kol2,',');
      getline(f,kol3,'\n');
      cout << kol1 << " " << kol2 << " " << kol3 << endl;
   }
   f.close();
   return 0;
}
