>>in C++(maybe C now) reading one past the end of an array is legal and guaranteed to work
i havn't got $250 to buy a copy of the standard from http://www.ansi.org, and point it out to ya, and i don't feel like hunting down an illegal copy.
so, get a C++ book that covers arrays(The C++ Programming Language by Bjarne Stroustrup) or even the STL, and read it, or read THE STL HEADERS!!!! A LOT OF THE STL RELIES ON THIS TO WORK!!!!FOR ONE THE VECTOR CLASS!!!!!!!