V Forum
[
log in
]
why i don't get the address of struct ?
k1attila12
2020-11-25 20:19
struct Mo {mut: x int}
fn main() {
mut w:=Mo{1}
println(&w) //this doesn't work
println(&(w.x)) //this work
}
Log in via GitHub to comment
Powered by
Vorum
, open-source blogging/forum software written in V
struct Mo {mut: x int}
fn main() {
mut w:=Mo{1}
println(&w) //this doesn't work
println(&(w.x)) //this work
}