Hỏi về cấu trúc dữ liệu?

Thảo luận trong 'Hỏi đáp chung' bắt đầu bởi kissofdeath, 15 Tháng mười hai 2012.

  1. Offline

    kissofdeath

    • Windows 2.0

    Số bài viết:
    162
    Đã được thích:
    21
    Điểm thành tích:
    20
    ai pro giải thích dùm đoạn này với, cảm ơn!
    Mã:
    typedef struct node
    {
          int key;
          node *next;
    };
    int main(void)
    {
        node *x,*y,*t;
        x=(node *)malloc(sizeof(node));
        y=(node *)malloc(sizeof(node));
        x->next=y;x->key=1;
        y->next=x,y->key=1;
        for(t=x;t->key<100;t=t->next)
        {
          t->key=x->key+y->key;
          }
          cout<<t->key<<endl;
        return 0;
    }
    

Chia sẻ trang này

Advertising: Linux system admin | nukeviet | nukeviet 4 | Upload ảnh miễn phí