Author: Jon Dart
Date: 07:28:17 06/09/02
Go up one level in this thread
On June 09, 2002 at 02:01:26, Paul Byrne wrote:
>On June 08, 2002 at 20:55:17, Jon Dart wrote:
>>class Move
>{
> unsigned data;
>public:
> Move() { }
> // lots of other stuff
>};
>
>class MoveList
>{
> int number;
> Move moves[512];
>public:
> MoveList() : number(0) { }
> // etc
>};
>
>Everytime I make a MoveList it calls some function to handle the move array
>which then does a loop which calls yet another function (which does nothing at
>all) 512 times. Ugh. I even checked the assembly to see what was going on.
You can do:
Move *myMoveList = (Move*)malloc(sizeof(Move)*512);
memset(myMoveList,'\0',sizeof(Move)*512);
then the constructors are never called.
--Jon
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.