#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
int main()
{
int numbers[] = { 10,20,30,40,50,10 };
int cx;
cx = count_if(numbers, numbers + 6, bind(less<int>(), std::placeholders::_1, 100));
cout << "There are " << cx << " elements that are less than 40.\n";
cx = count_if(numbers, numbers + 6, bind(less<int>(),100, std::placeholders::_2));
cout << "There are " << cx << " elements that are not less than 40.\n";
system("pause");
return 0;
}
#include <iostream>
#include <thread>
int main()
{
unsigned int in = std::thread::hardware_concurrency();
std::cout << in << std::endl;
}
Top comments (0)