Getting this weird error: unknown type name 'fsteam'

ROOT Version: 6.30.2
Platform: Windows10

I’m getting this error when trying to read a data file data.txt. I’m new to Root, I don’t know where is the problem and no one seemed to get this error. Can anyone help me ? This is my code:

#include <iostream>
#include <fstream>

void main()

	TH1F *hist = new TH1F("hist", "Histogram", 20, 0, 10);
	fsteam file;"data.txt", ios::in);
	double value;
		file >> value;
		if(file.eof()) break;
	TCanvas *C1 = new TCanvas();

and the error is simply; unknown type name ‘fsteam’

Sorry if it’s a very basic question.

Try with fstream instead of fsteam

I’s so dumb, thanks

1 Like