签到排名:今日本吧第个签到,
本吧因你更精彩,明天继续来努力!
连续签到:天 累计签到:天
0超级会员单次开通12个月以上,赠送连续签到卡3张
c++吧 关注:577,698贴子:2,100,643
#include<iostream>
using namespace std;
int main()
{
char* pt=new char;
*pt='d';
cout<<pt<<endl;
return 0;
}
运行结果是d。
而
#include<iostream>
using namespace std;
int main()
{
int* pt=new int;
*pt='d';
cout<<pt<<endl;
return 0;
}
运行结果是00151990.
为什么用char型的时候输出的不是地址值
跪求解