To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

lambda1.cpp 172 Bytes
Newer Older
Donjan Rodic's avatar
Donjan Rodic committed
1
2
3
4
5
6
7
8
9
10
#include <iostream>

int main()
{
  // create a function and store a pointer to it in f
  auto f = []() {std::cout << "Hello world!\n";};
  
  // call the function
  f();
}