cpp_prac/demos/print_seq.h
2025-01-11 17:45:38 +01:00

14 lines
279 B
C++

#ifndef PRINT_SEQ_H
#define PRINT_SEQ_H
#include <iostream>
template <typename C> void print_seq(const C &c) {
using std::cout;
using std::endl;
cout << "[length: " << c.size() << "] ";
for (const auto &x : c) std::cout << x << " ";
cout << endl;
}
#endif