Skip to content

Instantly share code, notes, and snippets.

@meghangill
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meghangill/cbfc96d3f9ab924a9776 to your computer and use it in GitHub Desktop.
Save meghangill/cbfc96d3f9ab924a9776 to your computer and use it in GitHub Desktop.
mongocxx::driver::client c{“mongo://example.com:27017”};
auto col = c[“testdb”][“testcol”];
for (auto doc : col.find({}) {
std::cout << bsoncxx::to_json(doc) << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment