Exemple d’utilisation de ‘min_element()’ avec des critères

Author:

 deque, iterator
{filelink=15171}

#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;

bool is_abs (int elem1, int elem2)
{
    return abs(elem1) < abs(elem2);
}

int main()
{
    deque coll;
    ostream_iterator output(cout, " ");
    for(int x=-3; x<=5; x++)
		coll.push_back(x);

     cout<<"Le contenu du deque: ";
	copy(coll.begin(), coll.end(), output);
	cout<
    

Leave a Reply

Your email address will not be published. Required fields are marked *