1 Star 0 Fork 0

wukai/GoStudy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
string_pointer.go 310 Bytes
一键复制 编辑 原始数据 按行查看 历史
Bruce.wu 提交于 2024-01-11 17:24 +08:00 . test http
package base
import (
"fmt"
)
func StringPointer() {
s := "Good Bye"
var p *string
p = &s
*p = "vicle"
fmt.Printf("Here is the pointer p: %p\n", p) // prints address
fmt.Printf("Here is the string *p: %s\n", *p) // prints string
fmt.Printf("Here is the string s: %s\n", s) // prints same string
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/thinkerwolf/GoStudy.git
git@gitee.com:thinkerwolf/GoStudy.git
thinkerwolf
GoStudy
GoStudy
62820d0e2c88

搜索帮助