Dear Sébastien, ArgArrays are just meant to pass arguments, nothing more, nothing less. They are very bad as data structures to be stored inside other data structures, they are just good when being created automatically: they allocate a huge chunk of memory on the runtime stack to speed up argument passing (avoiding malloc).
Otherwise they are useless, and they ought to be that. The best thing you can do is use to some other array data structure for storing your variables and then create a VarArgArray when needed from scratch (and do not store it anywhere!). Cheers Christian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sébastien Mouthuy Sent: Monday, May 21, 2007 8:35 PM To: [EMAIL PROTECTED] Subject: [gecode-users] IntVarArgs of unknown size... Hello everybody, I have a class with an IntVarArgs as instance variable, but its size is unknown at creation of my class. How can I safely set the size of my IntVarArgs in a function that is not my constructor. There is the allocate(int) function, but it is protected, and I am not sure whether it is safe to use it. Thanks. Cheers, sebastien _______________________________________________ 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
