the array.length() of C++

int num_elements = sizeof things / sizeof (short);
this is a use of the function "sizeof", in use of this function we can stop of crossing the border of the array.

posted on 2012-09-04 23:50  很遗憾我不是  阅读(428)  评论(0编辑  收藏  举报