utils: print a vector
This commit is contained in:
parent
5bfd9dd6a6
commit
551a644490
1 changed files with 13 additions and 0 deletions
13
includes/utils.hpp
Normal file
13
includes/utils.hpp
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
void print_vec(std::vector<T> vec) {
|
||||||
|
std::cout << "[ (" << vec.size() << ")\n";
|
||||||
|
for (auto it : vec) {
|
||||||
|
std::cout << " " << it << "\n";
|
||||||
|
}
|
||||||
|
std::cout << "]\n";
|
||||||
|
}
|
Reference in a new issue