Skip to content

Instantly share code, notes, and snippets.

@sebasjm
Created October 2, 2012 01:35
Show Gist options
  • Save sebasjm/3815646 to your computer and use it in GitHub Desktop.
Save sebasjm/3815646 to your computer and use it in GitHub Desktop.
goodbay java, hello c++ (again)
echo '
#include <iostream>
#include <string>
using namespace std;
int main() {
string x = "Hello";
auto say_hi = [x] (string y) { return x + " lambda " + y; };
cout << say_hi("world") << endl;
}
' | gcc -std=c++11 -xc++ - -lstdc++ -o app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment