书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

2012年5月8日

链表参数的引用与非引用

摘要: 今天做了一个简单的题目。但是,我发现,在传参数的时候,如果不使用引用传参,那么头指针就会随着tmp指针向后移动。如果使用引用传参的话,它就不会了。题目:http://acm.swust.edu.cn/oj/problem/172/View Code #include<stdio.h>#include<stdlib.h>#include<string.h>typedef struct node{ int n; struct node *next;}node;node *A, *B, *ta, *tb, *p;void Init_AB(){ A = (node* 阅读全文

posted @ 2012-05-08 22:50 More study needed. 阅读(502) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

点击右上角即可分享
微信分享提示