Ticket #38334: x.cpp

File x.cpp, 344 bytes (added by ralf@…, 11 years ago)

micro example

Line 
1#include <iostream>
2#include <mongo/client/dbclient.h>
3
4using namespace std;
5
6void run() {
7    mongo::DBClientConnection c;
8    c.connect("localhost");
9}
10
11int main() {
12    try {
13         run();
14         cout << "connected ok" << endl;
15    } catch( mongo::DBException &e ) {
16         cout << "caught " << e.what() << endl;
17    }
18    return 0;
19}