[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Binding a string-type variable
You can't bind strings. The best way to do it is to build an otcl linkage
(e.g., in your command()).
- Haobo
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_[20];
>
> But I get an error during compilation:
> no matching function for call to 'RTPAgent::bind (const char[11], char [20])'
>
> 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
>
>