Skip to content

Instantly share code, notes, and snippets.

@webmonch
Last active August 13, 2019 13:36
Show Gist options
  • Save webmonch/14d3daeffff6593c65d3 to your computer and use it in GitHub Desktop.
Save webmonch/14d3daeffff6593c65d3 to your computer and use it in GitHub Desktop.
2dimArr rapidjson
rapidjson::Document jsonDoc;
rapidjson::Document::AllocatorType& allocator = jsonDoc.GetAllocator();
jsonDoc.SetObject();
rapidjson::Value mainArr(rapidjson::kArrayType);
for (int i = 0; i < 6; ++i) {
rapidjson::Value row(rapidjson::kArrayType);
for (int j = 0; j < 7; ++j) {
rapidjson::Value objValue;
objValue.SetBool(false);
row.PushBack(objValue, allocator);
}
mainArr.PushBack(row, allocator);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment