Const vs. non-const.

From: <>
Date: Tue Feb 14 11:59:30 -0500 2006

  Is it required that the char_values[] array be declared const? Or
  can we omit the "const" keyword in the array declaration of

Apologies for the confusion. The code shown in the Background
Section of the assignment page is an example of how the character
values would be used by a hash function. In that case it makes sense
for them to be constant because they won't change.

In your program, however, the values probably will change as your
program explores various assignments to find a non-colliding one, in
which case the array will have to be non-const.

As an aside, your program is not required to use an array to hold the
values; you may use whatever data structure you think best as long as
you can print them out at the end. An array is an obvious data
structure to use, but if you can think of something else that's fine
Received on Tue Feb 14 2006 - 11:59:30 EST

This archive was generated by hypermail 2.2.0 : Tue Mar 21 2006 - 10:28:01 EST