How to compile my code

#include "TH1.h"

// "ROOT Script" entry point.
void wth() {
  TH1F *aPointer = new TH1F("a", "a", 10, 0., 1.);
  aPointer->Draw();
}

#if !defined(__CINT__) && !defined(__CLING__) && !defined(__ACLIC__)
// "Standalone Application" entry point.
// `root-config --cxx --cflags` -o wth wth.cc `root-config --libs`
int main()
{
  wth();
  return 0;
}
#endif /* !defined(__CINT__) && !defined(__CLING__) && !defined(__ACLIC__) */

BTW. When you post “source code” or “output” here, do remember to enclose them into two lines which contain just three characters ``` (see how your post has been edited above).