Input value when running root -b -q

I need help on how to get input value when running the following macro using “root -b -q”.
///////////////////////////
void oo(string s, int a)
{
cout<<s<<" "<<a<<endl;
}
////////////////////////

I did the following:

root -b -q oo.C\(\"test\"\, 10\)

The error message is:

Processing oo.C(“test”,…
input_line_11:3:1: error: expected expression
;
^
<<< cling interactive line includer >>>:1:1: error: expected ‘}’
input_line_11:1:42: note: to match this ‘{’
void __cling_Un1Qu30(void* vpClingValue) {

Any hints would be appreciated

Hi,

try

root -b -q 'oo.C("test", 10)'

cool. That works. Thanks

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