Login Register


C++ Binary Search filter_list
Author
Message
RE: C++ Binary Search #2
This is far from "working". It actually won't even compile regardless of the console colors header file not existing.
Code:
while (higher = true) { Mid cout << green << "Mid is " << Mid; }

What is 'Mid' doing in there? And aside from attempting to compare a boolean with true, you're actually assigning it true and thus the loop is syntactically synonymous with 'while(true)'

This also isn't a proper binary search because it doesn't continue with the search properly.

Reply





Messages In This Thread
C++ Binary Search - by Mafia - 05-05-2016, 11:11 AM
RE: C++ Binary Search - by 0xDEAD10CC - 06-19-2016, 07:13 PM



Users browsing this thread: 1 Guest(s)