A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/connect/instance/ below:

Create a Driver Instance - C++ Driver v4.1

To use the C++ driver, you must first create an instance of the mongocxx::instance class. This instance performs the following functions in your application:

This guide shows you how to create a mongocxx::instance object.

To create a mongocxx::instance object, include the mongocxx/instance.hpp header file in your application. Then, construct an instance of mongocxx::instance at the start of your application, as shown in the following example:

#include <mongocxx/instance.hpp>int main(){    mongocxx::instance instance;}
Important

You must create a mongocxx::instance object before you use the C++ driver, and this object must remain alive for as long as any other MongoDB objects are in scope.

To learn more about the mongocxx::instance class in the C++ driver, see the following API documentation:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4