Looking at the Node class declaration (MobileNode class inherits from Node) you can find the public method:
inline int address() { return address_;} So I think you can use the following: printf("TRG %.9f %d(%d,%d)@%d(%d,%d) d=%f xo=%f:", Scheduler::instance(). clock(), t->getNode()->address(), (int)tX, (int)tY,r->getNode()->address(), (int)rX, (int)rY, d, crossover_dist); Regards, Alessandra >----Messaggio originale---- >Da: crazyvishnu...@gmail.com >Data: 09/05/2012 7.47 >A: <ns-users@ISI.EDU> >Ogg: [ns] Help in NS2 > > >When I invoke the below line in Tworayground.cc in ns 2.34. I get the >following error. > >printf("TRG %.9f %d(%d,%d)@%d(%d,%d) d=%f xo=%f >:",Scheduler::instance().clock(), > t->getNode()->index(), (int)tX, (int)tY,r->getNode()->index(), >(int)rX, (int)rY, > d, crossover_dist); > > mobile/tworayground.cc:169:136: error: ‘class MobileNode’ has no member >named ‘index’ > > What I should do to get the node index? > > >-- >~VISHNU~ >