Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

cpp lambda function

#include <iostream>
using namespace std;

bool isGreater = [](int a, int b){ return a > b; }

int main() {
	cout << isGreater(5, 2) << endl; // Output: 1
	return 0;
}
Source by www.learncpp.com #
 
PREVIOUS NEXT
Tagged: #cpp #lambda #function
ADD COMMENT
Topic
Name
8+1 =