一個簡單的解決方案是創建兩個空vector並考慮一個指向vector中間元素的迭代器。 ... for (auto it = v.begin(); it != v.end(); ++it) {. std::cout << *it << ' ';. }.
確定! 回上一頁