Добавление массива BSON в документ MongoDB 3.2 и извлечение значений обратно (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;

Итак, как я могу добавить свой массив, а также как я могу считать обратно мой массив с плавающей точкой в ​​массив или вектор?

Ответы на вопрос(1)

Ваш ответ на вопрос