- 注册
- 2008-03-05
- 消息
- 102
- 荣誉分数
- 31
- 声望点数
- 0
不知道怎么样display the memory address of the char!code:
#include<iostream>
#include<conio.h>
usingnamespace std;
int main()
{
char type_c;
cout<< "Address of type_c: "<<&type_c
<<" size is "<<sizeof(type_c)<<" bytes"<<endl;
return 0;
}
the code above doesn't work ! so any body can help me figure it out
thanks !
output should like this:
Address of char: XXXXXXXXX size is XX bytes
#include<iostream>
#include<conio.h>
usingnamespace std;
int main()
{
char type_c;
cout<< "Address of type_c: "<<&type_c
<<" size is "<<sizeof(type_c)<<" bytes"<<endl;
return 0;
}
the code above doesn't work ! so any body can help me figure it out
thanks !
output should like this:
Address of char: XXXXXXXXX size is XX bytes