C++ Binary Search for Data Structures