[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns] Accessing variables of node.cc
Hello all
I am facing problem in accessing variable of node.h .......
My problem is
I have defined a public variable int state_ in class Node
of node.h and I sets its value to 100 in the costructor of Node in
node.cc .
But when I try to acces this variable in my agent.....recv
function by
Node* nst;
cout<<nst->state_;
It prints any arbitrary value.....why?????
can't I access the varables of node.h from my agent. Please also
suggest me that how can I set their values to like nst->state_ =50;
Is it possible or not in ns??????Please suggest
Thanx in anticipation
Regards,
===============================================================================
Pushpendra Singh
C-35,Nilgiri House
IIT Campus,New Delhi
E-mail: pushpendra@cse.iitd.ernet.in
singh.pushpendra@usa.net
pushpendra@iitian.com
Ph. : 91-11-6521278
Visit me at: www.cse.iitd.ernet.in/~csa99010
===============================================================================