Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <vector>
- using namespace std;
- int main()
- {
- auto isOdd = []()->bool
- {
- int a;
- cin >> a;
- if (a % 2 != 0) cout << "true" <<endl;
- else cout << "false" <<endl;
- return (a % 2 != 0);
- }();
- string string1 = "abc";
- string string2 = " def";
- auto concatenateString = [](string a, string b)->string
- {
- string s1 = a + b;
- cout << s1 << endl;
- return s1;
- }(string1, string2);
- vector<string> wektor;
- wektor.push_back("abc");
- wektor.push_back("ABC");
- wektor.push_back("XyZ");
- for_each(wektor.begin(), wektor.end(),
- [](string string1)->int {
- int size = string1.size();
- cout << string1 << " " << size << endl;
- return size;
- });
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement