ArrayLastIndexOf

搜索一维数组中最后出现的值。

template<typename T>

int ArrayLastIndexOf(

   T&         array[],         // 用于搜索的数组

   T          value,           // 搜索值

   const int  start_index,     // 索引起始点

   const int  count            //搜索范围

   );

参数

&array[]

[out]  要搜索的数组。

value

[in]  已搜索的值。

start_index

[in] 搜索开始的索引起始点。

count

[in]  搜索范围长度。

返回值

返回最后找到的元素的索引。如果该值未找到,返回-1。