Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
First
// count algorithm example #include <iostream> // std::cout #include <algorithm> // std::count #include <vector> // std::vector int main () { // counting elements in array: int myints[] = {10,20,30,30,20,10,10,20}; // 8 elements int mycount = std::count (myints, myints+8, 10); std::cout << "10 appears " << mycount << " times.\n"; // counting elements in container: std::vector<int> myvector (myints, myints+8); mycount = std::count (myvector.begin(), myvector.end(), 20); std::cout << "20 appears " << mycount << " times.\n"; return 0; }
run
|
edit
|
history
|
help
0
Recursive Sort Example
Test size_t
ljblblljkl
SubsequenceArray
6 14 15 17 21 33 29
Derivation of the 0x9E3779B97F4A7C17u constant
Forgetting to check end
Template Meta Programming
applidiumResto_NicolasCarre
Pointer array