#include
#include
#include
using namespace std;
template
void print(T& c){
for( typename T::iterator i = c.begin(); i != c.end(); i++ ){
std::cout << *i << endl;
}
}
int main( )
{
const double data[] = { 3.14, 2.78, 1.51, 7.66, 9.65 };
list original( data, data + sizeof( data ) / sizeof( data[0] ) );
vector vector_data( 3, 3.33 );
list list_data( 4, 4.44 );
// show results
print( original );
print( vector_data );
print( list_data );
// assign a list to a list
list_data = original;
// assign a list to a vector
vector_data.assign( original.begin(), original.end() );
print( list_data );
print( vector_data );
}