From 833d5e30334b8c645c2aa171f0ada7b64f253abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=93=E8=88=AA?= <1210603696@qq.com> Date: Mon, 22 Dec 2014 09:53:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9print=5Fcontainer=E7=9A=84?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TinySTL/Test/TestUtil.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TinySTL/Test/TestUtil.h b/TinySTL/Test/TestUtil.h index 30d8867..da01bd7 100644 --- a/TinySTL/Test/TestUtil.h +++ b/TinySTL/Test/TestUtil.h @@ -3,6 +3,7 @@ #include #include +#include #include "..\Algorithm.h" @@ -10,8 +11,8 @@ namespace TinySTL{ namespace Test{ template - void print_container(Container& container){//不是每一个容器都有const_iterator - std::cout << "Container : "; + void print_container(Container& container, const std::string& name = ""){//不是每一个容器都有const_iterator + std::cout << "Container " << name << " :"; for (auto val : container){ std::cout << val << " "; }