[gecode-users] Help -- about Gecode::Space::operator new
Christian Schulte
cschulte at kth.se
Wed Aug 26 20:58:46 CEST 2009
Hi, I think I need to see the full code to help. There must be something how
you call new (maybe the type of temp) that is the problem.
Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Kayler Yao
Sent: Wednesday, August 26, 2009 4:04 PM
To: users at gecode.org
Subject: [gecode-users] Help -- about Gecode::Space::operator new
hi,
I had a trouble in my project when i wrote a class inheriting from
Class Space and run it with DFS. The error is
"error C2660: 'Gecode::Space::operator new' : function does not take 3
arguments"-------------------------happened in
"
GenSolModel * m = new GenSolModel
(temp);------------------------------------error line
DFS<GenSolModel > e(m);
delete m;
while (GenSolModel * s = e.next())
{
s->print();
delete s;
}
"
I have spent much time to find the reason but with no results. I had
written anther question class to test ,and it could run OK. I think that the
constructor of
this class didn't conflict with the class Space , but why came out this
error. Who can give me a thought to help me to find the answer?
Look forward to your reply!
note:
1.VS2008 + Gecode 3.1.0
2.
class GenSolModel: public Gecode::Space
{
protected:
IntVarArray succ;
public:
GenSolModel(int data);
GenSolModel(bool share, GenSolModel& s);
~GenSolModel();
virtual Space *copy(bool share);
void print(void);
};
Kayler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20090826/0d3186fa/attachment.htm>
More information about the gecode-users
mailing list