hi i am using CINT. unfortunately, i cannot reproduce the original problem in another macro. perhaps i was doing something wrong in the first macro. thanks paymon On Sun, 21 Dec 2003, Rene Brun wrote: > I cannot reproduce this problem. > Are you executing via CINT or via compiled code? > > Could you send a very short running example reproducing the problem? > > Rene Brun > > On > Sat, 20 Dec 2003, > payman hosseini > wrote: > > > hi > > i have the following code: > > void start_Sjk_calculations(TTree * t1,TNtuple * onoff,const int > > n_units,float * p) > > { > > int i=0,j=0; > > int ntrials = (Int_t)onoff->GetEntries(); > > cout<<"in new module"<<endl; > > cout<<ntrials<<endl; > > > > } > > > > and the output is 19, which is the correst value. > > but if i try: > > void start_Sjk_calculations(TTree * t1,TNtuple * onoff,const int > > n_units,float * p) > > { > > int i=0,j=0; > > const int ntrials = (Int_t)onoff->GetEntries(); > > cout<<"in new module"<<endl; > > cout<<ntrials<<endl; > > > > } > > the output is zero, which is wrong. why does "const" make the value of > > ntrials become zero? > > > > i am using: > > Windows/NT/w2000 with VC++ 7.0,compiled with debug info, version 3.10/02 > > (good old tar file)**WIN32GDKDEBUG > > > > thanks, > > paymon > > >
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET