This commit is contained in:
nub31
2025-07-03 20:17:43 +02:00
parent fee4951a96
commit 7b900effa3
2 changed files with 27 additions and 6 deletions

View File

@@ -13,9 +13,19 @@ struct Human
export func main(args: []cstring): i64
{
let x: cstring = "test"
c::puts(x)
let x = alloc Human
{
name = alloc Name {
first = "john"
last = "doe"
}
age = 23
}
print_name(x&)
return 0
}
func print_name(human: ^Human) {
c::puts(human^.name.last)
}