#include void co60() { TH1F *hist1 = new TH1F("hist1","title1", 100, 0., 2000); TH1F *hist2 = new TH1F("hist2","title2", 100, 0., 2000); std::ifstream infile("Co60.txt"); int x1,x2; while (infile >> x1 >> x2) { hist1->Fill(x1); hist2->Fill(x2); } auto c = new TCanvas("canvas", "title", 800, 600); c->Divide(1,2); c->cd(1); hist1->Draw(); c->cd(2); hist2->Draw(); }