Now I can start playing with C++11.
This is a Hello world program (that I got from here) to check that g++ is working fine:
#include <iostream> using namespace std; int main() { auto func = [] () { cout << "Hello world\n"; }; func(); }To compile it:
$ g++ -std=c++11 -o lambdaHello lambdaHello.cppAnd then I get my "Hello world":
$ ./lambdaHello Hello world
No comments:
Post a Comment