void hz_05C290counts() { TH1F *hist = new TH1F("hist","Histogram",1000,0,1000); fstream file; file.open("cross_dmp.txt", ios::in); double n1,n2,n3,n4,n5,n6,n7,n8,n9,n10; while(1) { double x1; file >> x1 ; if (x1=6.000012000000000D+06) { n1++; } if(file.eof()) break; } file.close(); cout << "count(C) = "<< n1 << endl; }