|
From: | Marcus G. Daniels |
Subject: | Re: [Swarm-Support] C arrays and swarm: strange behaviour (long) |
Date: | Tue, 18 Mar 2008 20:21:52 -0600 |
User-agent: | Thunderbird 2.0.0.12 (Windows/20080213) |
paul box wrote:
One bug is that you can't loop up to and including TOTAL unless you extend the arrays by one, e.g. "double avePay[TOTAL+1]. Otherwise <= instead of < will run off the end of the array.-shiftLists { Player * playboy; double avePay[TOTAL]; // double proportion[TOTAL]; double trigger[TOTAL]; int i, j; The average pay of each strategy is calculated for each list: for (i=SOCIAL; i<=TOTAL; i++) avePay[i] = 0.0;
[Prev in Thread] | Current Thread | [Next in Thread] |