How to use ROOT?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Ubuntu
Compiler: g++


Hi! I’m new to ROOT and I’m just trying to learn the basics. So I’m want to draw an histogram.
I’m using Ubuntu 20.6, I’m using Atom and I’m writing in C++. I created a file called “tut1.cpp” and the code is the following:

#include
#include “TH1F.h”
#include “TCanvas.h”

int main()
{
TH1F *hist = new TH1F(“hist”, “Histogram”, 100, 0,100);

TCanvas *c1 = new TCanvas();

hist->Draw();
}

I run this in the terminal white the command: g++ tut1.cpp $(root-config --glibs --cflags --libs)
Then: ./a.out

And nothing happens. I was expecting a canvas whit an empty histogram to appear.
So my question is: What should I write to get some visual output?