Ticket #38334: x.cpp
File x.cpp, 344 bytes (added by ralf@…, 12 years ago) |
---|
Line | |
---|---|
1 | #include <iostream> |
2 | #include <mongo/client/dbclient.h> |
3 | |
4 | using namespace std; |
5 | |
6 | void run() { |
7 | mongo::DBClientConnection c; |
8 | c.connect("localhost"); |
9 | } |
10 | |
11 | int 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 | } |