Re: [ROOT] compilation

From: Patois Yannick (patois@ganil.fr)
Date: Wed Feb 21 2001 - 09:36:59 MET


> Hello rooters,
> I cannot compile the script (below), where is my error ?

> //..................test...............
> #include <stdlib.h>
> #include <stdio.h>
> #include <iostream.h>
> class TF1;

>       TF1 *fun = new TF1("fit",fitf,-3,3,3);

I'm not sure it will be enough, but you have at least to include the
definition of TF1:
#include <TF1.h>

A declaration such as : "class TF1" only allow you to declare a pointer
on TF1, and not doing anything with it (the compiler know nothing more
than 'a class TF1 exist', it doesnt know anything about it's members
functions (so you cant call them) neither it's data (so it doesnt know
the size of the class, so you cant allocate any of it).

Have a look on the User_Guide, I've seen some pages with examples that
are close to what you'r trying to do.

	Yannick



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:37 MET