14 years, 3 months ago
Highlights
14 years, 3 months ago
@szecs you're right about NULL, i could use a number like -999 as a flag. But what do you mean by saying break the loop with sorted lists and the original code with while, i…
14 years, 3 months ago
Assuming that array is sorted that way, I believe one solution to the endless loop can be: ... if(found != NULL) cout << searchKey << " is in position "…
14 years, 3 months ago