The problem is that you have initialized your Sale array incorrectly. Note that your *declaration* is [NUM_STORES][NUM_DEPTS][NUM_MONTHS], but you're initialization is based on [NUM_DEPTS][NUM_MONTHS][NUM_DEPTS]. It looks like you incorrectly repeated the NUM_DEPTS constant, which would skew the way your array is represented in memory.....
No comments:
Post a Comment