> Hi rooters, > > I have a class, TFuzzyVariable, derived from TNamed. I have > overloaded operators =, +, -, <, >, etc. in this class. > > Now I would like to do something like > > TFuzzyVariable TF1("TF1","TF1"); > TFuzzyVariable TF2("TF2","TF2"); > TFuzzyVariable TF3("TF3","TF3"); > > gRoot->ProcessLineSync("TF1=TF2+TF3"); > > It looks like I can not do this, perhaps because CINT thinks > TF1,TF2 and TF3 are pointers when I call them by names in > ProcessLine(); Hmmm, I think it must not work at all. The right (safe) way to do what you want: TFuzzyVariable TF1("anyTF1","TF1"); TFuzzyVariable TF2("anyTF2","TF2"); TFuzzyVariable TF3("anyTF3","TF3"); char commandBuffer[256]; sprintf(commandLine, "(*((TF1 *)(0x%x))) = (*((TF1 *)(0x%x))) + (*((TF1 *)(0x%x))) ", &TF1,&TF2,&TF3); gRoot->ProcessLineSync(commandLine); Or something like this (pleae re-count the brackets in the expression above, I may miscount them) > > Any suggestions? > > Best regards, > Anton >
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:44 MET