02/21/00
COM1100 Winter2000 Yuhong Yin
11
Array bounds
nOne cannot change the size of a given array
n 
nSome C++ complier do not check the value of the indexing being used (called a bounds check)
nCompile time : no error messages
nRun time: crash or error
nVisual C++ complier does the bound check, but only give you some warning messages, not error messages.
nExample
nint temp[5]; // declare an integer array with 5 elements
ntemp[2] = 5; // valid
ntemp[5] = 3; // wrong, out of bound
n
n