[gecode-users] Fwd: Initialize IntVArArgs from variable array a

peter Tomson pikapikanaoufel at gmail.com
Wed Oct 2 06:25:45 CEST 2013


---------- Forwarded message ----------
From: peter Tomson <pikapikanaoufel at gmail.com>
Date: 2013/10/2
Subject: Re: [gecode-users] Initialize IntVArArgs from variable array a
To: Guido Tack <tack at gecode.org>


Hi

Sorry to be so bothring but this instruction that YOU gave me : IntVarArgs
x(v); doesn't work for me!!!!

let me explain: by just writing this instruction in the model it gave me
also an error because none of the declaration that exist in the site of
Gecode does match the argument list????

this is what i wrote : vector<int> W;
for (int i=0;i< 10;i++)
 W.push_back(i);
             IntVarArgs R(W);

i konw there is a mistack here but i don't konw what is it ??? I'm really
 new with Gecode that's why i do so my errors
So sorry to be so bothring

Thank YOU for any help at all

PETER


2013/10/2 Guido Tack <tack at gecode.org>

> Hi,
>
> I think you need to brush up on your C++, that's the type signature, not
> the code you should write.  Just check our documentation, you can construct
> an IntVarArgs from a vector v like this IntVarArgs x(v);
>
> Cheers,
> Guido
>
> On 02/10/2013, at 1:21 PM, peter Tomson <pikapikanaoufel at gmail.com> wrote:
>
> > hi all !
> >
> > in my model i have to get the interger variables from a vector , So i
> used this code that i found in MPG :
> >
> > IntVarArgs (const std::vector< IntVar > &a);
> >
> > but i have an error about the const : type name not allowed!!!!!!!!!!
> >
> > honnestly i declared an IntVarArray R, after that i wrote that code, So
> do i do any thing wrong ??? Do i mis ay thing ??
> >
> > Thank you very much for your hepl
> >
> > PETER
> >
> > _______________________________________________
> > Gecode users mailing list
> > users at gecode.org
> > https://www.gecode.org/mailman/listinfo/gecode-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20131002/0729d9aa/attachment.html>


More information about the users mailing list