This isn't really a gecode question, it's more about c++.  Your while loop 
makes no sense (a is never empty).  And it's certainly possible to use gecode 
in a GUI application.

Cheers,
Guido

On 12/09/2013, at 9:53 AM, peter Tomson <[email protected]> wrote:

> hi everyOne!
> 
> i'm new with gecode and i hope YOU can help me to solve my problem .
> 
> i'm trying to use Gecode as my solvor in my project , i created a project 
> with VS2010c++, with some GUI,. In  my class which using gecode, i have to 
> get my variables from another class .
> 
> I read the MPG , and i find in section :  Dinamiclly argument array , i tryed 
> to use it with my vector a like this :
> 
> IntVarArgs v;
> std::vector<int> a ;
>               for (int i=0;i<5;i++)
>                       a.push_back(i);
>               int u=0;
>               while (!a.empty())
>               {
>                       v<< IntVar (*this,a[u],a[u+1]);
>                 u++;
> 
>               }
> 
> but with this i can't get  the elments from the array  one by one , i just 
> added in each iteration 2 elemnt from array a to the IntVarargs v , is there 
> any other way to do it ???
> Honnestly what i want to do is this : execute the code in my class that 
> contains the code developed by gecode by a click on a  button in a GUI is 
> that even possibel ?? because when i added the includes of gecode to a GUI it 
> doesn't work
>  
> thak YOU very much for any help 
> 
> _______________________________________________
> Gecode users mailing list
> [email protected]
> https://www.gecode.org/mailman/listinfo/gecode-users

_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to