[galib] Defining GALIB class objects
Mert Tas
mert_tas at yahoo.com
Mon Oct 4 11:01:48 EDT 2004
Hi everybody,
I have a problem about defining the GALIB class objects outside the main().
For example when I want to define a GA1DBinaryStringGenome object inside a function other than main() as follows:
int SomeFunction()
{
....
GA1DBinaryStringGenome genome(20, objective);
GASteadyStateGA ga(genome);
......
}
int main() {
SomeFunction();
return 0;
}
the compiler gives the following error:
Error C2664
'__thiscall GA1DBinaryStringGenome::GA1DBinaryStringGenome(unsigned int,float (__cdecl *)(class GAGenome &),void *)' : cannot convert parameter 2 from 'float (class GAGenome &)' to 'float (__cdecl *)(class GAGenome &)'
Does anybody have any suggestion how to define these GALIB class objects inside a function ?
Thanks and bye.
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20041004/d6902db8/attachment.htm
More information about the galib
mailing list