有如下程序
#include<iostream>
using namespace std;
int main()
{cout<<("join"=="join" ? "":"not")<<"equal\n";
getchar();
char* str1="good";
char* str2="good";
cout<<(str1==str2 ? "": "not")<<"equal\n";
getchar();
char buffer1[6]="hello";
char buffer2[6]="hello";
cout<<(buffer1==buffer2 ? "" : "not")<<"equal\n";
getchar();
}
書上顯示編譯后結(jié)果是
not equal
not equal
not equal
但是我編譯后顯示的結(jié)果是
equal
equal
not equal
請高手指點(diǎn)指點(diǎn)哦!!