Hi I have to do something similar but when I try the same code written here to subtract histograms i get the following error
Error: illegal pointer to class object c2 0x0 75 (tmpfile):1:
*** Interpreter error recovered ***
An 0x0 pointer kind of an internal ROOT equivalent of a null pointer, so you can’t dereference it to draw or call other methods, because it doesn’t point to anything useful.
Generally getting a 0x0 pointer means that the FindObject/GetPrimitive/etc method couldn’t find the thing you named. Check that the name is correct and that the file actually contains it (it’s relatively easy to check interactively with a TBrowser for example).