有如下程序
#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();
}
书上显示编译后结果是
not equal
not equal
not equal
但是我编译后显示的结果是
equal
equal
not equal
请高手指点指点哦!!