U++ framework
Do not panic. Ask here before giving up.

Home » Community » Newbie corner » Algorithms and Vectors
Re: Algorithms and Vectors [message #28138 is a reply to message #28136] Wed, 18 August 2010 16:06 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Javier,

The predicate is basicaly a less than function, not equality. So the code should be
class Predicate{
public:		
	bool operator()(const A& lhs, const A& rhs){
		return lhs.a<rhs.a;	
	}
};


Honza
 
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: Sun May 10 14:36:13 GMT+2 2026

Total time taken to generate the page: 0.00843 seconds