【发布时间】:2013-11-17 16:02:34
【问题描述】:
这里只是一个测试原型:
#include <iostream>
#include <string>
using namespace std;
int main()
{
int a=10;
char b='H';
string c="Hamza";
cout<<"The value of a is : "<<a<<endl;
cout<<"The value of b is : "<<b<<endl;
cout<<"The value of c is : "<<c<<endl<<endl;
cout<<"address of a : "<<&a<<endl;
cout<<"address of b : "<<&b<<endl;
cout<<"address of c : "<<&c<<endl;
return 0;
}
为什么变量'b'的地址,是字符类型,不打印?
【问题讨论】:
标签: c++ character memory-address