我對以下數據有懷疑;爲什麼指向char的指針與其他數據類型的指針相比表現不同
int intvalue = 3;
int *pointInt = &intvalue;
char* p = "string";
cout << pointInt << std::endl; // this will give memory location of intvalue which is ok.
cout << p<< std::endl; // why this will give string value rather than memory location of where string is stored?
由於重載操作的''<<我 – aragaer 2013-03-27 10:15:30
編輯的標題;問題是關於'char *',而不是指向'char *'的指針。 – 2013-03-27 11:15:10