As I am new to c++11 and followed a documentation provided by mongoDB. I am able make a connection to mongo and able to insert and fetch content to/from it.
But uri's scope is limited to my main(), it can not pass to other functions which are defined in other .cpp files.
So I wanted to make a connection which will creates a unique instance of mongo cxx::uri params for my each program, so that I won't need to specify the connection params like IP,Port,User,Password etc every time. In short a config file should have these params and which would be read by a .cpp program, which results into instance of mongo cxx::uri
So please let me know how do I go ahead with C++ in detail steps.