I have an array within Mongo that I had populated, but I am unsure how to populate it using the C++ driver.

The is what the array looks like.
I tried the following,
// Creating the array of line items
bsoncxx::builder::basic::array lineItemArr = bsoncxx::builder::basic::array{};
for(LineItem *lineItem: getLineItems()) {
lineItemArr.appendlineItem);
}
Where LineItem is an object that has the fields within the array. I am perplexed on how to get this, as when I run this I get the following error
C2338: append is disabled for non-char pointer types
I also tried this, and it crashed without giving an error.
// Creating the array of line items
bsoncxx::builder::basic::array lineItemArr = bsoncxx::builder::basic::array{};
for(LineItem *lineItem: getLineItems()) {
lineItemArr.append(bsoncxx::builder::basic::make_document(bsoncxx::builder::basic::kvp("description", lineItem->getDescription()),
bsoncxx::builder::basic::kvp("grouping", lineItem->getGrouping()),
bsoncxx::builder::basic::kvp("partNumber", lineItem->getPartNumber()),
bsoncxx::builder::basic::kvp("price", lineItem->getPrice())));
}