aboutsummaryrefslogtreecommitdiff
path: root/examples/learn/12-aliases.zc
blob: abb39d56623e3088edd2576c169fe771c43a96b9 (plain) (blame)
1
2
3
4
5
6
7
8
struct node { int v; node* next; };
fn main() {
	node* a = new(node), b = new(node);
	a.v = 3; b.v = 4; a.next = b;
	node* c = a.next;
	put_n(c.v); put_c(10);
	return 0;
}