From 3f6de3125149891ac66268138ce4f025160feddd Mon Sep 17 00:00:00 2001 From: Soyn Date: Tue, 3 May 2016 16:12:52 +0800 Subject: [PATCH] fix --- ch13/ex13_08.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch13/ex13_08.h b/ch13/ex13_08.h index 59cf76c4..1f01fdad 100644 --- a/ch13/ex13_08.h +++ b/ch13/ex13_08.h @@ -20,7 +20,7 @@ class HasPtr { HasPtr(const HasPtr &hp) : ps(new std::string(*hp.ps)), i(hp.i) { } HasPtr& operator=(const HasPtr &rhs_hp) { if(this != &rhs_hp){ - std :: string *temp_ps = new std :: string(*rhs_hp); + std::string *temp_ps = new std::string(*rhs_hp.ps); delete ps; ps = temp_ps; i = rhs_hp.i;