Add double to legend

Hi all,
I want to add a couple of numbers calculated previously to TLegend. How can I do it?
For example:

const double_t a  = 10;
const double_t b  = 5;
TLegend *legend = new TLegend(0.53,0.7,0.79,0.95);
legend->SetHeader("","C");
legend->AddEntry(a/b, "ratio="," ");

This is not working…

Thanks in advance,
Veljko


legend->AddEntry(((TObject*)0), TString::Format("ratio = %g", a/b), "");

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.