#include #include #include #include #include using namespace std; //myAlgo_equal_range1.cpp int main() { pair::iterator, vector::iterator>R1; //vector and vector iterator ostream_iterator< int > output( cout, " " ); int n1[] = { 69 ,60,63,61,65,64,71,70,68,64 }; vector< int > Vint1( n1, n1+10 ); cout << "\n----ostream_iterator output ----\n"; copy( Vint1.begin(), Vint1.end(), output ); // R1= equal_range( Vint1.begin(), Vint1.end(),64 ); cout<<"\n *R1.first : " <<*R1.first <<" *R1.second :" << *R1.second; // int x , y ; x = int( Vint1.end()-R1.first ); y = x + int(Vint1.end() - R1.second); cout<<"\n first appearnce of 64 at : " << x; cout<<"\n second appearance of 64 at : " << y; // return 0; }