A
Angus
Hello
int records[] = {1,2,3,4,5,6,7,8,9};
int len = sizeof(records)/sizeof(int);
bool fnd = std::binary_search(records, records+len, 7);
This is fine to find if element exists in array. But how do I find
the position in the array?
Angus
int records[] = {1,2,3,4,5,6,7,8,9};
int len = sizeof(records)/sizeof(int);
bool fnd = std::binary_search(records, records+len, 7);
This is fine to find if element exists in array. But how do I find
the position in the array?
Angus