++



         

- 5


!= string::npos )

(*first).erase( pos, 1 );

}

}

:

#include <string>

#include <algorithm>

#include <iterator>

#include <vector>

#include <iostream>

bool length_less( string s1, string s2 )

{ return s1.size() < s2.size(); }

int main()

{

istream_iterator< string > input( cin ), eos;

vector< string > text;

// copy -

copy( input, eos, back_inserter( text ));

string filt_elems( "\",.;:");

filter_string( text.begin(), text.end(), filt_elems );

int cnt = text.size();

// max_element -

string *max = max_element( text.begin(), text.end(),

length_less );

int len = max->size();

cout << " "

<< cnt << endl;

cout << " "

<< len << endl;

cout << " "

<< *max << endl;

}

max_element() , string, :

65

4

wind

, wind  . , string , . wind  . , length_less(). :

65

9

beautiful

20.2

: string, double, string, int, string. , .

20.3

. . .