Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Algorithms and Vectors
Re: Algorithms and Vectors [message #28186 is a reply to message #28130] Fri, 20 August 2010 21:05 Go to previous messageGo to previous message
mr_ped is currently offline  mr_ped
Messages: 826
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
The FindBinary actually should return index of the searched value, in your example "0", or -1 if the value is not found.

So something's wrong if it does not work.

But the vector must be already sorted by that less predicate before calling it (as far as I can tell, Vector {1,2} is sorted, so that piece of code still looks fine).

Maybe I should start TheIDE a try it myself... (reluctant to do it and compile, I'm on very slow PC)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Open An image upon startup
Next Topic: Assert failed in core/value.h line 464
Goto Forum:
  


Current Time: Sat Jun 21 16:32:06 CEST 2025

Total time taken to generate the page: 0.03606 seconds