++


count() - 2


* RogueWave ,

* distance_type , count()

*

*

* :

*

* typedef iterator_traits<InputIterator>::

* distance_type dis_type;

*

* dis_type elem_count;

* elem_count = count( textlines.begin(), textlines.end(),

* search_item );

***********************************************************************

int elem_count = 0;

list<string,allocator>::iterator

ibegin = textlines.begin(),

iend = textlines.end();

 

// count()

count( ibegin, iend, search_item, elem_count );

 

cout << "count(): " << search_item

<< " " << elem_count << " ()\n";

}




- -  - -  - -