Author: David Rasmussen
Date: 14:08:04 12/15/02
Go up one level in this thread
On December 15, 2002 at 16:12:30, Russell Reagan wrote: >Most examples of search functions that I have seen involve returning the result >by value, usually an int. I'd like to know how to go about arriving at a result >that contains more information that a simple int can hold. For example, if I >have a struct like this: In general, if you want to return something compound, make a holder for it (struct/class etc.), and return such a beast. Alternatively you can have one of your arguments be a pointer/reference to a caller supplied "holder". There are other ways too. Whether it is a good idea for what you're trying to do, I don't know. /David
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.