阅读背景:

Adding a BSON Array to a MongoDB 3.2 document and extracting the values back ( MongoCXX 3.2 ) ( C++ 11)

来源:互联网 
    // The document I want to add data to and extract it back from c++
           bsoncxx::builder::stream::document data_builder,

           // I want to try and save this array in my document , as I want to  populate it later
           bsoncxx::builder::stream::array mybsonarr;
           for(float i = 0 ; i < 5 ; i = i + 0.1f){
             mybsonarr << i;
           }


// Now this line Throws an error 
data_builder << "_id" << 5 << "my_array" << &mybsonarr;
    // The document I want to add data to and e



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: