1.在陣列尾端放一個特別的marker代表結束。 · 2.將陣列第一個元素和最後一個元素傳進去,STL的algorithm就是使用這個技巧,如sort(svec.begin(), svec.end() ...
確定! 回上一頁