谢谢楼上的哥们,我领教了不少啊!谢谢!
♂ 死后定当长眠,生前何须久睡。♀
const 定义的常量在三种情况下才会在内存中分配地址的
具体是哪三中情况我也不知道了 等我回去再查一查告诉大家
如果fconst int a=90执行这一条语句后就分配地址了吗?我也有点疑惑 请大家指教指教啊
const double&b;
double&sconst b;
const double &const b;
分别表示什么意思啊
#include <iostream>
using namespace std;
int main()
{
int a;
const int b=0;
int c;
cout;
cout<<&a<<\" \"<<&c;
return 0;
}
输出:0x22ff8c 0x22ff84
#include <iostream>
using namespace std;
int main()
{
int a;
const int b=0;
int c;
cout;
cout<<&a<<\" \"<<&b<<\" \"<<&c;
return 0;
}
输出:0x22ff8c 0x22ff88 0x22ff84