ArrayIndexOf
搜索一维数组中第一次出现的值。
template<typename T>
int ArrayIndexOf(
T& array[], // 用于搜索的数组
T value, // 搜索值
const int start_index, //索引起始点
const int count //搜索范围
);参数
&array[]
[out] 要搜索的数组。
value
[in] 已搜索的值。
start_index
[in] 搜索开始的索引起始点。
count
[in] 搜索范围长度。
返回值
返回找到的第一个元素的索引。如果该值未找到,返回-1。