Hello Fernando, You can use the following code:
Tcl& tcl = Tcl::instance(); sprintf(tcl.buffer(), "set my_tcl_var %f", 10.123); tcl.eval(); Note that you can use the same method to execute any command on Tcl. You can find more information in chapter 3 of the ns-manual. Good luck Waleed On Tue, Jan 20, 2009 at 3:09 PM, <fh...@c3sl.ufpr.br> wrote: > > Well, it is just as the title says: I would like to know how to change the > value of my tcl script variables from inside my C++ code. I learned how to > change C++ variables from inside the tcl code, but not the tcl variables > from inside the C++ code. Is there any easy way? > > > Thanks in advance, > -- > Fernando Henrique Gielow - UFPR - NR2 > Computer Science graduation student. > >