It happened to be wrong to bind the right C++ variable in a structure in my code, will it work? I have written some c and h files in my ns, and i must bind corresponding c variables with tcl variables to let it run correctly. In ns manual, the bindings are such as:
ASRMAgent::ASRMAgent() { bind("pdistance_", &pdistance_); ... ... } while in my code, the c variable is in a structure: class TailYaw : public VecPosition { public: ...... protected: ... struct TOT tot; ... }; ...... TailYaw::TailYaw(......){ ...... bind("damaging_", &tot.surface.pu); ...... } I believe it will run well, but when i make my ns, some error infomation come out: bmspu/bmvecinpu.cc:165: no matching function for call to ` TailYaw::bind(const char[10], unsigned char*)' /user/ns/ns-allinone-2.26/tclcl-1.0b13/tclcl.h:174: candidates are: void TclObject::bind(const char*, TracedInt*) /user/ns/ns-allinone-2.26/tclcl-1.0b13/tclcl.h:175: void TclObject::bind(const char*, TracedDouble*) /user/ns/ns-allinone-2.26/tclcl-1.0b13/tclcl.h:176: void TclObject::bind(const char*, double*) /user/ns/ns-allinone-2.26/tclcl-1.0b13/tclcl.h:179: void TclObject::bind(const char*, unsigned int*) /user/ns/ns-allinone-2.26/tclcl-1.0b13/tclcl.h:180: void TclObject::bind(const char*, int*) /user/ns/ns-allinone-2.26/tclcl-1.0b13/tclcl.h:182: void TclObject::bind(const char*, TclObject**) /user/ns/ns-allinone-2.26/tclcl-1.0b13/tclcl.h:185: void TclObject::bind(const char*, int64_t*) so many candidates it give to me, all the candidates are not indicated to my structure. I have tried to bind an int variable in my code, it work, so something must have been happened when i bind a variable in c strucuture