摘要: (int)a、&a、(int)&a、(int&)a的区别,很偏僻的题#include<iostream>#include<stdio.h>#include<string.h>#include<conio.h>usingnamespacestd;intmain(){floata=1.0f;cout<<sizeof(int)<<endl;//4cout<<sizeof(float)<<endl;//4cout<<(int)a<<endl;//1cout&l 阅读全文
posted @ 2013-04-25 22:15 米其林轮船 阅读(426) 评论(0) 推荐(0) 编辑
摘要: int* pt:指向int的指针;新建指针后,要先指向一个确定的适当的地址。int*pt=new int:new根据数据类型(int)找到一个长度正确的内存块,并返回其地址。delete pt:释放使用new分配的内存,不删除指针。int *pt=new int[10];pt[i];//使用数组de... 阅读全文
posted @ 2013-04-25 18:23 米其林轮船 阅读(124) 评论(0) 推荐(0) 编辑