我們可以使用自定義線性搜尋功能在 vector 中找到給定元素的位置。 ... using std::vector; int findIndex(const vector<int> &arr, int item) { for ...
確定! 回上一頁