#include <array>
#include <iostream>
#include<algorithm>
#include <iterator>
using namespace std;
int main(void)
{
[](){}();
[](){cout << "hello" << endl; }();
[](int i){cout << i << endl;}(5);
auto func = [](int i) ->int {cout << i << endl;return -1;};
func(5);
int x = func(4);
cout << "x = " << x << endl;
/*
vector<int> v(10, 2);
v.insert(v.end(), 6);
struct IsEven{
bool operator()(int i)
{
return i % 2 == 0;
}
};
if (std::all_of(v.cbegin(), v.cend(), [](int i) -> bool { return i % 2 == 0; }))
//if (std::all_of(v.cbegin(), v.cend(), IsEven()))
{
std::cout << "All numbers are even\n";
}
else
{
std::cout << "All numbers are not even\n";
}
*/
return 0;
}
04-15
3万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)