TF1::SetTitle breaking the code


I am running what is below:

[code]#include “TCanvas.h”
#include “TF1.h”

int main(/* arguments /)
TF1 formula(“form”,"[0] + x
x * [1]", 0, 10);
formula.SetTitle(“My formula”);

TCanvas can(“can”,“”, 800, 600);

return 0;

When I do:

I get:

Error in <TFormula::Eval>: Formula is invalid and not ready to execute Myformula is unknown.

And when I go into formula.cxx I see that the formula was replaced by the title. I need the title to be “My Formula” so that TCanvas::BuildLegend() can give me the legend picking up the name of the TF1 from the title. Is there a way to avoid that the formula name be replaced by the title?


the title of the formula is the formula ! you should not change it