Hello , I am Arun Kumar Gupta
i am writing a MANET routing protocol ,
so i am making changes in DSR and doing my Work .
for this i want to add some information in the Mobile node like node_status
, y (these are some variables which will be used in my Thesis )
i tried but it didn't worked
i defined these variable in
mobilenode.h
.......
...
private :
int y_ ;
int node_status_ ;
......
public :
inline int CDS_y() { return y_; }
inline int CDS_node_status() { return node_status_; }
......
defined in
mobilenode.cc
MobileNode::MobileNode(void) :
pos_handle_(this)
{
......
y_ = 0 ;
node_status_ = 0;
}
this was done then i was trying to access these variables from the god.cc
files
....
..
..
mb_node = new MobileNode*[num_nodes];
//for creating the object of mobile node
int aa = mb_node[i]->CDS_node_status();
while i was compiling everything was okkk but
when i gone for run it made an statement
warning: no class variable SRNodeNew::y_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable SRNodeNew::node_status_
Segmentation fault (core dumped)
after this whole program was terminated ,
###################
first please me why this warning and error is coming ,
and suggest me how to deal with this please Help me it's too important
####################
'thanx
Regards
Arun Kumar Gupta
[email protected]
--
View this message in context:
http://network-simulator-ns-2.7690.n7.nabble.com/ns-Adding-Some-Custom-Information-in-Mobile-node-tp26231.html
Sent from the ns-users mailing list archive at Nabble.com.