Hi! I try to use a static int to count the number of times a function is
called. The example is below:
void ex ()
{
Int_t result = -1;
result = blah();
cout << result << endl;
cout << count << endl;
}
Int_t blah ()
{
static Int_t count = 0;
count++;
return count;
}
root [0]
Processing ex.C...
1
Error: Symbol count is not defined in current scope ex.C:7:
(class G__CINT_ENDL)34877216
*** Interpreter error recovered ***
AFAIK count should have been known and printed .. is it something that i
am missing? (v5-28-00d)
Thanks,
Adrian
This archive was generated by hypermail 2.2.0 : Mon May 16 2011 - 17:50:01 CEST