[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] printing variable in C++
hi,
get an instance of the TCL interpreter and pass a command for it to
execute...
For Example : let us say u want to print a C++ variable called
count_(floating point variable ) then here is how u do it
Tcl::instance().evalf("puts stdout \"Count = %f\" ", count_);
Refer to Chapter 3, section 3.3.2 of the NS Documentation...
Manoj.
On Wed, 5 Dec 2001, Mahesh wrote:
> Hi seniors,
> I was twikling the code of compute_routes() function in route.cc
> file since a couple of days. I'm not able to see the values of the
> variables (hopcnt(), ROUTE(), ROUTE_ENTRY()), whatever i print, they are
> shown as zeros. I felt that a variable in C++ can't be printed directly.
> If that is true, How to print them?
>
> Thanks in Advance,
>
> Regards,
> Mahesh.
>
>
>
>
--
"Resistance to aggression is not only justifiable but imperative.
Non-Resistance hurts both egoism and altruism -- Herbet Spencer"
C.MANOJ KUMAR,
M.Tech, 2nd Year,
Kanwal Rekhi School Of IT,
IIT Bombay
www.it.iitb.ac.in/~manoj