转自http://my.oschina.net/tanyixiu/blog/174243
C++中没有现成的获取数组元素个数的方法,只有自己写。
1 | int count = sizeof (array) / sizeof (array[0]); |
转自http://my.oschina.net/tanyixiu/blog/174243
C++中没有现成的获取数组元素个数的方法,只有自己写。
1 | int count = sizeof (array) / sizeof (array[0]); |