Hi, I am developing a propagator which constructors takes an IntVarArray as parameter, and I want to initialize a ViewArray on this parameter. My current code looks like :
class MyPropagator : public Propagator { ViewArray<IntView> C; MyPropagator(Home home,IntVarArray& c) : Propagator(home), C(home,c.size()) { for(size_t j=0;j<4;j++) C[j]=IntView(c[j]); C.subscribe(home,*this,PC_GEN_ASSIGNED); } }; When I run the code, I have segmentation fault. I suppose that my constructor is not correct. Thanks. -- Dr. Pascal Francq Belgium _______________________________________________ Gecode users mailing list users@gecode.org https://www.gecode.org/mailman/listinfo/gecode-users