Hi,

I am trying to print out some intermediary values using tcl.evalf.
However, I get a segmentation fault as soon as I try to print a float
value to a string in the C++ TcpAgent Code:

char str[200];

sprintf(str, "puts \"desired case: cwnd=%f, fallback=%f ssthresh=%f
x=%f y=%f \"", cwnd_, fallback_cwnd_, ssthresh_, x, y); //Segmentation
fault encountered in this statement!

tcl.eval(str);

I am using ns-2.29 on a linux system: uname -a ==
Linux server 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686
i686 i386 GNU/Linux

Please let me know what is the cause of the Segmetation fault and how
we can possibly remove it.

Thanks and anticipation,
Krishna

Reply via email to