2009年4月26日 星期日

指標觀念

int *a ; //指標式宣告
int b=10 ;

a=&b; //only can write by this way #no *a=xxx

cout<<"*a"<<*a; //輸出10
cout<<"a="<<a; //輸出b的址

沒有留言:

張貼留言