Newb in root needs help: overlaying 2 histograms

So i am a total newb trying to over lay 2 histogram on top of one another, and below is my code. It may look a little clumsy:

#include "Riostream.h"
#include "TCanvas.h"
#include "TStyle.h"
#include "TH1.h"
#include "TGaxis.h"

void onedhisto() {
//  Read data from an ascii file and create a root file with an histogram and an ntuple.
      

// this file has 1 column of float data
	
   TCanvas *c1 = new TCanvas("c1","MPV distribution",600,400);
// first histogram
   ifstream in;
   in.open("onedhisto.txt");
   Float_t x;
   Int_t nlines = 0;
   TFile *f = new TFile("onedhist.root","RECREATE");
   TH1F *h1 = new TH1F("h1","Multiplied Charges Distribution",93,20,50);
	
	
   while (1) {
      in >> x;
      if (!in.good()) break;
      if (nlines < 42) cout<<x<<endl;
      h1->Fill(x);
      nlines++;
   }
   printf(" found %d points\n",nlines);
	h1->Draw();
	TH1F *h2 = h1->Rebin(3,"Rebinned");
	h2->SetLineColor(kRed);
	h2->Draw(hist);
//	c1->update();
   in.close();

//second histogram
   ifstream in2;
   in2.open("onedhistoafter.txt");
   Float_t x2;
   Int_t nlines2 = 0;
//   TFile *f = new TFile("onedhist.root","RECREATE");
   TH1F *h3 = new TH1F("h3","Multiplied Charges Distribution",93,20,50);

   while (1) {
      in >> x2;
      if (!in2.good()) break;
      if (nlines2 < 47) cout<<x2<<endl;
      h3->Fill(x2);
      nlines2++;
   }
   	c1->cd();
   printf(" found %d points\n",nlines2);
	h3->Draw();
	TH1F *h4 = h3->Rebin(3,"Rebinned");
	h4->SetLineColor(kBlue);
	h4->Draw();
//	c1->update();
   in2.close();

   }

it prints out the x2 values so i know that the date is read. But after i run it, i only see the first histogram in blue…what did i do wrong?
(the first one should be red and the 2nd one should be blue…)
Any help is appreciated.

Edited after correcting some error in code.

// ... h1->Draw(); // creates axes (frame) and draws "h1" // ... h2->Draw("SAME"); // ... h3->Draw("SAME"); // ... h4->Draw("SAME"); // ...

Hey thanks for the reply.
I tried your suggestion, but when i do that, it runs on for ever and started printing 0s in the command prompt. The window is a blank.
Would you know why that happens?
Thanks for the newb out!

You should at least correct:
in2 >> x2;

Thank you very much!

Thank you very much!