From 551a644490c91494cb2cd771e1c20d2237fc6424 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 31 Dec 2023 03:29:40 +0100 Subject: [PATCH] utils: print a vector --- includes/utils.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 includes/utils.hpp diff --git a/includes/utils.hpp b/includes/utils.hpp new file mode 100644 index 0000000..1b5f709 --- /dev/null +++ b/includes/utils.hpp @@ -0,0 +1,13 @@ +#pragma once + +#include +#include + +template +void print_vec(std::vector vec) { + std::cout << "[ (" << vec.size() << ")\n"; + for (auto it : vec) { + std::cout << " " << it << "\n"; + } + std::cout << "]\n"; +}