void print(cont& container)
{
    std::cout<<"the container holds the following contentce: "<<std::endl;

    for(typename cont::iterator iter=container.begin(); iter!=container.end(); iter++)
    {
        std::cout<<*iter<<std::endl;
    }
}
Exemple #2
0
template <typename cont, void printer(const typename cont::value_type, FILE *)> static void
printContainer(const cont &v, FILE *f)
{
	fprintf(f, "[");
	for (auto it = v.begin(); it != v.end(); it++) {
		if (it != v.begin())
			fprintf(f, ", ");
		printer(*it, f);
	}
	fprintf(f, "]");
}
Exemple #3
0
 crange( const cont & c) 
     : m_first( c.begin() ), m_last( c.end() ) {
 }