kennen:lib:adjacent_find
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— | kennen:lib:adjacent_find [2020-06-14 13:45] (aktuell) – angelegt - Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== adjacent_find() ====== | ||
+ | ''# | ||
+ | |||
+ | <code cpp> | ||
+ | For adjacent_find (For first, For last) | ||
+ | For adjacent_find (For first, For last, Binary pred) | ||
+ | For adjacent_find (Exec pol, For first, For last) | ||
+ | For adjacent_find (Exec pol, For first, For last, Binary pred) | ||
+ | |||
+ | For ranges:: | ||
+ | For ranges:: | ||
+ | </ | ||
+ | [[..: | ||
+ | | ||
+ | das mit seinem Nachfolger übereinstimmt bzw. | ||
+ | mit seinem Nachfolger das Prädikat '' | ||
+ | |||
+ | ==== Parameter ==== | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | ==== Ergebnis ==== | ||
+ | Rückgabewert: | ||
+ | bzw. '' | ||
+ | |||
+ | ==== Siehe auch ==== | ||
+ | [[equal_range]]. | ||
+ | |||
+ | ==== Beispiel ==== | ||
+ | <code cpp adjacent_find.cpp> | ||
+ | #include < | ||
+ | #include < | ||
+ | |||
+ | int main() | ||
+ | { | ||
+ | double arr[] = { 1, 2, 3, 3, 4 }; | ||
+ | double *ptr = std:: | ||
+ | if (ptr != end(arr)) | ||
+ | { | ||
+ | std::cout << ptr[0] << " == " << ptr[1] << ' | ||
+ | } | ||
+ | } | ||
+ | </ | ||