Access Out of Range

xiaoxiao2021-03-06  64

Suppose OneLinetext Is A String

Don't forget to check the index or it coulde! LENTHG CHECKING MUST Performe At First Rather Than Access The Char in The String or Ran!

The Following Will Be Out of Range Because It May Acces The Character Out of The Rang Before It Check The Boundary.

=================================================================================

While (isalpha) && (i)) && (i

{

i ;

} // End while

=================================================================================

The Following Code Will Be All Right.

=================================================================================

While ((i

{

i ;

} // End while

=================================================================================

转载请注明原文地址:https://www.9cbs.com/read-92159.html

New Post(0)