#include
using std::cout;
using std::endl;
#include
#include
#include
int main()
{
int tab[ 10 ] = { 1, 2, 3, 4, 4, 6, 6, 6, 6, 8 };
std::vector< int > v( tab, tab + 10 );
std::ostream_iterator< int > output( cout, " " );
std::copy( v.begin(), v.end(), output );
std::vector< int >::iterator ub;
ub = std::upper_bound( v.begin(), v.end(), 6 );
cout <<"La dernière position d'insertion de 6 est entre"
<< *( ub - 1 ) <<" et "
<<*ub <