Hi all,
may be that the answer to my question is simple but I can’t found documentation that can help me!!!
What I want to do is to execute a script that reads a boolean variable!!!
I tried in this way (obviously is just the code of interest and the filename is foo.C):
but it doesn’t work!!!
It sais:
Processing foo.C…
Error: Illegal pointer operation (tovalue) FILE:foo.C LINE:4
*** Interpreter error recovered ***
I tried several methods but the best I reached was to print the output exiting from Root (as if CINT flushes the output buffer while exits)!!!
My question is:
is it possible to use cin and cout for booleans (for other types there are no problems)?
Thanks!
Bye…
I can not reproduce this problem with the latest version of root.
However the latest version of cint does not properly execute cint>>mybool;
So instead use an int or compile (with ACLiC for example) your macro.
CINT/ROOT C/C++ Interpreter version 5.15.159, Nov 14 2004
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] bool a = true
root [1] cout << a << endl;
1
root [2] .q
[/quote]