cpp_prac/demos/print_seq.h

15 lines
279 B
C
Raw Normal View History

2025-01-11 17:45:38 +01:00
#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