2012年10月22日

小谈指针和引用

摘要: 指针一、概念1、“指针”是指地址,是常量,“指针变量”是指取值为地址的变量 变量的指针就是变量的地址。存放变量地址的变量是指针变量。二、理解1、i_pointer代表指针变量,而*i_pointer是i_pointer所指向的变量i=3;i_pointer=&i;2、调用函数swap(int *p1,int *p2){int temp;temp=*p1;*p1=*p2;*p2=temp;}main(){int a,b;int *pointer_1,*pointer_2;scanf("%d,%d",&a,&b);pointer_1=&a;poi 阅读全文

posted @ 2012-10-22 22:46 即为将军 阅读(293) 评论(0) 推荐(0) 编辑

welcome to my blog

摘要: 阅读全文

posted @ 2012-10-22 21:53 即为将军 阅读(1383) 评论(0) 推荐(1) 编辑

导航