Normally you want to do the opposite: cal otcl in c++ and get the returned
string.

For that you should use the macros in my file ns_utils.cc
http://tagus.inesc-id.pt/~pestrela/ns2/contributed_code.html#_Toc147652229

eg:
        TCL_EVALF("%s some_instproc %d", name(), MH_iaddr);
        assert( *TCL_RESULT );
        etimip_RO_id = atoi(TCL_RESULT);

----------

for your particular problem, you should use the Command() interface that all
c++  objects have


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Amin Irandoost
> Sent: terça-feira, 20 de Março de 2007 22:14
> To: ns-users@ISI.EDU
> Subject: [ns] Please help me
> 
> 
> hi all
> in general
> 
> how to capture return value of c++ function in tcl?
> --
> Amin Irandoost


Reply via email to