Plot from a data file

Hi, I have a basic problem but I am newby in ROOT. I wanto to read a data ascii file and plot it. But I can’t I did the following:

ifstream in;“basic.dat”,ios::in);
Int_t lines=0;
Float_t x,y,z;
in >> x >> y >> z;
if (!in.good()) break;
if (lines <5>Draw(“AC*”);

But this doesn’t work. What I is wrong?

It seems you are using TGraph. One the TGraph constuctor makes a TGraph from an ASCII file. Have a look at:
The last constructor listed there is the one you are looking for.