From aa3618337c5cb09b556b76a071beb13d5d7ce13a Mon Sep 17 00:00:00 2001 From: skiy Date: Sat, 24 Oct 2015 09:03:40 +0800 Subject: [PATCH] Update 07.2.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 文字错误 --- eBook/07.2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eBook/07.2.md b/eBook/07.2.md index c9c47c4..3ef315d 100644 --- a/eBook/07.2.md +++ b/eBook/07.2.md @@ -226,7 +226,7 @@ v := make([]int, 10, 50) 这样分配一个有 50 个 int 值的数组,并且创建了一个长度为 10,容量为 50 的 切片 v,该 切片 指向数组的前 10 个元素。 **问题 7.3** 给定 `s := make([]byte, 5)`,len(s) 和 cap(s) 分别是多少?`s = s[2:4]`,len(s) 和 cap(s) 又分别是多少? -**问题 7.4** 假设 `s1 := []byte{'p', 'o', 'e', 'm'}` 且 `s2 := s1[2:]`,s2 的值是多少?如果我们执行 `s2[1] = 't'`,s1 和 s2 现在的值又分配是多少? +**问题 7.4** 假设 `s1 := []byte{'p', 'o', 'e', 'm'}` 且 `s2 := s1[2:]`,s2 的值是多少?如果我们执行 `s2[1] = 't'`,s1 和 s2 现在的值又分别是多少? ## 7.2.5 多维 切片