漏掉了一个右大括号符

This commit is contained in:
miraclesu
2013-06-24 13:19:20 +08:00
parent 45a2da6e5b
commit 7ecb01c41f
2 changed files with 6 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ Go 语言的取地址符是 `&`,放到一个变量前使用就会返回相应
下面的代码片段Example 4.9 [pointer.go](examples/chapter_4/pointer.go))可能输出 `An integer: 5, its location in memory: 0x6b0820`(这个值随着你每次运行程序而变化)。
var i1 = 5
fmt.Printf(An integer: %d, its location in memory: %p\n, i1, &i1)
fmt.Printf("An integer: %d, it's location in memory: %p\n", i1, &i1)
这个地址可以存储在一个叫做指针的特殊数据类型中,在本例中这是一个指向 int 的指针,即 `i1`:此处使用 *int 表示。如果我们想调用指针 intP我们可以这样声明它
@@ -125,4 +125,4 @@ Example 4.23 [testcrash.go](examples/chapter_4/testcrash.go):
##链接
- [目录](directory.md)
- 上一节:[时间和日期](04.8.md)
- 下一节:[控制结构](05.0.md)
- 下一节:[控制结构](05.0.md)