Overload problem with TF1 when compiled

Hi Rooters,
this is what I would like to do:

#include "TF1.h" void SummersGone() { TString s = "5*x"; TF1 *tt = new TF1("ButAutumnIsNice", s, 10, 100); tt->Draw(); }
and it works alright with any CINT version, alright with root 5.14 and gcc 3.2.3, alright with root 5.12 and gcc 3.3.3, but with root 5.16/00 and gcc 3.3.3 I get an error:

[quote]~/ItsGettingAutumn.cxx: In function void ItsGettingAutumn()': ~/ItsGettingAutumn.cxx:5: error: call of overloadedTF1(const char[10], TString&, int, int)’ is ambiguous
/root/5_16_00/gcc.3.3.3/include/TF1.h:94: error: candidates are: TF1::TF1(const char*, ROOT::Math::ParamFunctor, double, double, int)
/root/5_16_00/gcc.3.3.3/include/TF1.h:85: error: TF1::TF1(const char*, const char*, double, double)
[/quote]
How can I make this work again? (And, what is a ROOT::Math::ParamFunctor anyway? :wink: )
Thank you for your support!
Cheers,
Rafi :smiley:

Replace the line

TF1 *tt = new TF1("ButAutumnIsNice", s, 10, 100); by

TF1 *tt = new TF1("ButAutumnIsNice", s.Data(), 10, 100);
to avoid the ambiguity with the new signature .

Rene

Wow, that was quick… thanks Rene! :smiley:
Cheers,
Rafi :smiley: