How to draw x=2 in ROOT?

I want to draw a line like x=2 using TLine, but it always report an error like this:

I have tried different type like int; float ,and double, but it still say it is the wrong type. Do you know where is the problem?

I have defined x1,x2,y1,y2 as different type.

TLine *l1 = new TLine(x1, y1, x2, y2);

I missed that. Thank you !

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