GithubHelp home page GithubHelp logo

posts/go/value-quote/ about blog HOT 4 OPEN

utterances-bot avatar utterances-bot commented on June 4, 2024
posts/go/value-quote/

from blog.

Comments (4)

koushr avatar koushr commented on June 4, 2024

func main() {
s := "脑子进煎鱼了"
fmt.Printf("main 内存地址:%p\n", &s)
hello(&s)
}

func hello(s *string) {
fmt.Printf("hello 内存地址:%p\n", &s)
}

from blog.

koushr avatar koushr commented on June 4, 2024

func main() {
s := "脑子进煎鱼了"
fmt.Printf("main 内存地址:%p\n", &s)
hello(&s)
}

func hello(s *string) {
fmt.Printf("hello 内存地址:%p\n", &s)
}

from blog.

koushr avatar koushr commented on June 4, 2024

func main() {
s := "脑子进煎鱼了"
fmt.Printf("main 内存地址:%p\n", &s)
hello(&s)
}

func hello(s *string) {
fmt.Printf("hello 内存地址:%p\n", &s)
}
hello里面不应该是这样打印吗? fmt.Printf("hello 内存地址:%p\n", s) 这样打印出来结果是一样的

from blog.

jincheng9 avatar jincheng9 commented on June 4, 2024

Go语言没有传引用的说法,可以参看我写的文章
https://mp.weixin.qq.com/s?__biz=Mzg2MTcwNjc1Mg==&mid=2247483678&idx=1&sn=27acd77cc05709b16cdd7e1a89470f38&chksm=ce124e71f965c767b642533547792836754f533d40b18fec9b970a83c35fae4b1c61ac4f005d&token=2029492652&lang=zh_CN#rd

from blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.