Array values passed from external function

Hello all,
I have run into a problem I can't find a solution to. I pass an array from IDL (a programming application like Matlab). The array is passed by referrence to a function tha creates an object (g) and calls a method (add_edge) with an element of the array as a parameter. The calling "works" but the value seems to be wrong when it arrives.
The calling routine:

1
2
3
4
void Init(int *e2){
...
node_one=int(e2[0]);
g -> add_edge(node_one,1, 3, 4);


An error occurs in the add_edge function at the line for testing the variable:

1
2
assert(_i >= 0 && _i < node_num); // Causing error
assert(_j >= 0 && _j < node_num);


here _i is node_one and the second line (where _j is the int 1) causes no error (if one ever come so far).
If I pass the values one by one by value from my external program I have no problems.

Thanks a lot
Andreas Bjärkmar
More info is needed especially about the architecture of your program, DLL's libs etc? The more info, the better the answer
Topic archived. No new replies allowed.