Add your own classes in root

I have a c++ program with a file containing a main, which calls a class which has normally a .c and a .h file.
i would like to run this program with root.
how can i define the class in root?
thank you.


Please re-read the User’s guide chapter on “adding a class” :slight_smile:.
The short answer is that you either need to use ACLiC (gROOT->ProcessLine(".L myheader.h+"):wink: or write a LinkDef file, call rootcint, compile and link the resulting source file.