Mercurial > hg > CbC > CbC_gcc
view CbC-examples/selftype.c @ 98:5211b774b8b5
implemeted selftype expression. add CbC-exanples/selftype.c
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 24 Jan 2012 03:25:13 +0900 |
parents | |
children |
line wrap: on
line source
/* struct node { int num; struct node *child; // struct node **array_node; }; */ #include <stdio.h> struct node { int num; selftype *child; }; int main() { struct node n, nc; n.num = 1; nc.num = 2; n.child = &nc; printf("n.num = %d\n",n.num); printf("n.child.num = %d\n",n.child->num); return 0; }