Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ lambda as variable

int main() {
  auto myfunc = [](int a, int b) -> int {
    return a + b;
  }
  cout << myfunc(12, 2);
}
Source by www.learncpp.com #
 
PREVIOUS NEXT
Tagged: #lambda #variable
ADD COMMENT
Topic
Name
7+8 =