I need to pass values of an array from tcl to c++.. I tried the following
code:

Here y1 is a 1-d array in my tcl script...

int index =1;
double y;
tcl.eval("set y1(index)");
y = atof(tcl.result());

I am getting an error that 
set x1(index): can't read "x1(index)": no such element in array
    while executing
"set x1(index)"
 
Also I've tried as,
double y[];
tcl.eval("set y1");
y = atof(tcl.result());

Here too i'm getting error as "Cannot assign a double to double[]"

Can anybody please help me?



--
View this message in context: 
http://network-simulator-ns-2.7690.n7.nabble.com/Passing-array-values-to-c-file-tp28093.html
Sent from the ns-users mailing list archive at Nabble.com.

Reply via email to