[ns] Binding a string-type variable
Tue, 23 Jan 2001 22:28:08 -0800 (PST)
You can't bind strings. The best way to do it is to build an otcl linkage
(e.g., in your command()).
On Tue, 23 Jan 2001, Roy Nitert (ELN) wrote:
> Hello all,
> I'm having trouble binding a string-type variable. What I want to do is to pass a name (filename) from TCL to C++.
> I've added the tcl object to tcl/lib/ns-default.tcl:
> Agent/RTP set inputFile_ "speech.in"
> In C++ at the Agent creator I've added:
> bind("inputFile_", inputfile_);
> and declared inputfile_ as:
> char inputfile_;
> But I get an error during compilation:
> no matching function for call to 'RTPAgent::bind (const char, char )'
> Does anybody understand this and has a way around this? Or perhaps a different way to pass a string from TCL to C ?
> Kind regards,
> Roy Nitert