2020-04-23から1日間の記事一覧
ソートしたい配列の「先頭」と「末尾」ではなく、「先頭」と「末尾の次」を渡す。以下の配列でソートを試してみる。 位置 0 1 2 3 4 要素 5 43 7 89 1 ■「末尾のイテレータ」を渡す例 #include <algorithm> #include <iostream> int main() { int num[5] = {5, 43, 7, 89, 1}; std</iostream></algorithm>…
ソートしたい配列の「先頭」と「末尾」ではなく、「先頭」と「末尾の次」を渡す。以下の配列でソートを試してみる。 位置 0 1 2 3 4 要素 5 43 7 89 1 ■「末尾のイテレータ」を渡す例 #include <algorithm> #include <iostream> int main() { int num[5] = {5, 43, 7, 89, 1}; std</iostream></algorithm>…