[gecode-users] Building an intset with an int[][2]
Jérémie Vautard
jeremie.vautard at laposte.net
Tue Sep 4 17:15:25 CEST 2007
Hi !
I have a problem concerning the use of the IntSet(int[][2],int)
constructor : I have a function which builds the array of ranges with
a code which looks like :
{
int** ret = new int*[length_of_array]
for (int i=0;i<length_of_array;i++) ret[i] = new int[2];
return ret;
}
In another class, I want to build the IntSet using the array given by
my function. However, if I do :
int** myRanges = my_function(parameters);
Intset mySet(myRanges,the_length);
XCode answers me : Invalid conversion from int** to int.
Obviously, it tries to use the wrong constructor ( IntSet(min,max) ),
but then, that means it considers there is a difference between int[]
[] and int** types.
Do you have an idea of how to make it use the right constructor ?
Cheers,
Jeremie
More information about the gecode-users
mailing list