View Single Post
  #15   Spotlight this post!  
Unread 06-03-2010, 19:42
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Camera code does not recognize target

In the old days with C, the sorting algorithm did use a compare function that returns 0, -1 or 1. Apparently, in C++, it is expecting a bool return. I don't know for sure for Wind River C++ but I checked with the Microsoft Visual C++ and it does say the compare function is expected to return bool. I did change the compare function to return bool and it is much more reliable now.

http://msdn.microsoft.com/en-us/libr...h1(VS.71).aspx

Quote:
_Comp
User-defined predicate function object that defines the comparison criterion to be satisfied by successive elements in the ordering. A binary predicate takes two arguments and returns true when satisfied and false when not satisfied.
__________________

Last edited by mikets : 06-03-2010 at 19:45.
Reply With Quote