Skip to content

Instantly share code, notes, and snippets.

@rgcottrell
Created April 28, 2013 23:59
Show Gist options
  • Save rgcottrell/5478939 to your computer and use it in GitHub Desktop.
Save rgcottrell/5478939 to your computer and use it in GitHub Desktop.
Hello world in C++11 with threads and lambdas.
#include <iostream>
#include <thread>
int main(int argc, const char * argv[])
{
std::thread t([]{
std::cout << "Hello, Lambda!" << std::endl;
});
t.join();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment