<DIV>Hi everybody, </DIV>
<DIV>&nbsp;</DIV>
<DIV>I have a problem about defining the GALIB&nbsp;class objects&nbsp;outside the main().</DIV>
<DIV>For example&nbsp;when I want&nbsp;to&nbsp;define&nbsp; a GA1DBinaryStringGenome object inside a function other than main() as follows:</DIV>
<DIV>&nbsp;</DIV>
<DIV>int SomeFunction()</DIV>
<DIV>{</DIV>
<DIV>&nbsp;&nbsp; ....</DIV>
<DIV><FONT color=#0000ff>
<P></FONT>GA1DBinaryStringGenome genome(20, objective);</P><FONT color=#0000ff>
<P></FONT><FONT>GASteadyStateGA ga(genome);</FONT></P>
<P>......</P>
<P>}</P>
<P>int main() {</P>
<P>SomeFunction();</P>
<P>return 0;</P>
<P>}</P></DIV>
<DIV>the compiler gives the following error:</DIV>
<DIV>&nbsp;</DIV>
<DIV>Error C2664</DIV>
<DIV>'__thiscall GA1DBinaryStringGenome::GA1DBinaryStringGenome(unsigned int,float (__cdecl *)(class GAGenome &amp;),void *)' : cannot convert parameter 2 from 'float (class GAGenome &amp;)' to 'float (__cdecl *)(class GAGenome &amp;)'</DIV>
<DIV>&nbsp;</DIV>
<DIV>Does anybody have any suggestion how to define these GALIB class objects inside a function ?</DIV>
<DIV>Thanks and bye.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><p>
                <hr size=1>Do you Yahoo!?<br><a
href="http://vote.yahoo.com">vote.yahoo.com</a> - Register online to vote today!