Skip to content

Instantly share code, notes, and snippets.

@Urquelle
Forked from pervognsen/BTree_Range_Query.cpp
Created January 22, 2019 17:09
Show Gist options
  • Select an option

  • Save Urquelle/9fa214cead421ddf98e6ccab3d6a358e to your computer and use it in GitHub Desktop.

Select an option

Save Urquelle/9fa214cead421ddf98e6ccab3d6a358e to your computer and use it in GitHub Desktop.
BIterator iterator, iterator_end;
BIterator_FindEqualOrGreaterItem(&iterator, &tree, key_begin);
BIterator_FindEqualOrGreaterItem(&iterator_end, &tree, key_end);
Value sum = 0;
while (!BIterator_Equals(&iterator, &iterator_end)) {
sum += *iterator.value;
BIterator_FindNextItem(&iterator);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment