#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;
}
Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!
Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.
Top comments (0)