C++ Programming on Linux - Update MongoDB Connection From Remote Using TLS

Опубликовано: 18 Март 2026
на канале: Hui Yuan
285
6

In this short video it's going to go back and discuss MongoDB, there are few videos early have discussed how to install MongoDB on Linux and using C++ to connect, insert and query database collections.
Recently one of viewer @azfalca995 wrote feed back mention during compile, it got error that get_utf8() is deprecated and solution use document::element::get_string() instead

the version of previous video using was mongo-cxx-driver-r3.4.2, and current version is r3.10.1, so I downloaded current version of mongocxx, and it is true document.element.get_utf8() method has been removed.

The example of this video will update previous program to using version r3.10.1 and update MongoDB connection from remote using TLS.

Below ae link of previous video related to MongoDB:
   • C++ Programming on Linux Query MongoDB thr...   --- Query MongoDB through Restful Web Service
   • C++ Programming on Linux Connect to MongoDB   --- Connect to MongoDB
   • C++ Programming on Linux Query data from  ...   --- Query data from MongoDB and Parse BSON Data

Example code have been uploaded to GitHub for your reference:
https://github.com/yuanhui360/CPP-Pro...