Trouver les éléments d’un tableau qui ne se répètent pas dans un autre à l’aide de la fonction ‘set_difference()’

Author:

 iterator, set
Download


#include 
using namespace std;
#include 
#include 

 int tab1[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9};
 int tab2[] = { 4, 5, 6, 7, 8 };
 int tab3[] = { 4, 5, 6, 7,6 , 20 };
int main()
{

   ostream_iterator< int > output( cout, " " );

   cout << "Contenu de tab1: ";
   copy( tab1, tab1 + 9, output );
   cout<
    

Leave a Reply

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