Author: Russell Reagan
Date: 20:23:41 11/24/03
Go up one level in this thread
On November 24, 2003 at 22:32:08, macaroni wrote: >another question...how could the following function be called? > >int MoveGenerator(int turn,Move* List[100]) the idea is, i want to pass it the >pointer of an array of 'Move's and it fills the array with possible moves. The >function compiles fine, but I don't know how to call it. >thanks again An array is the same thing as a pointer (more or less). So your function should be one of the following, but not both: int MoveGenerator ( int turn, Move * List ); int MoveGenerator ( int turn, Move List[] ); There isn't a need to put the size. You know what the size is. Putting it won't stop your code from going past the end of the array. If you want that functionality, use a vector.
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.