cout输出问题! 紧急
#include<iostream.h>#include<string.h>
void main()
{
char a[20],*str1="hello",*str2="wang";
cout<<str2;
}
为什么cout输出的不是str2所指向的字符串的地址?
2008-11-08 20:21
程序代码:#include<iostream.h>
void main()
{
char a[20],*str1="hello",*str2="wang";
cout<<(int*)str2;
}
2008-11-08 20:45
2008-11-08 21:34
2008-11-08 21:49
2008-11-08 22:21
2008-11-09 00:44
2008-11-09 00:55
2008-11-09 01:01
2008-11-09 01:02
2008-11-09 01:03