大神请指点
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
const char aSec[]="tencent";
if("tencent"==aSec){
cout<<"1"<<endl;
}
if(0==strcmp("tencent",aSec)){
cout<<"2"<<endl;
}
const char *szThd="tencent";
if("tencent"==szThd){
cout<<"3"<<endl;
}
if(0==strcmp("tencent",szThd)){
cout<<"4"<<endl;
}
if(aSec==szThd){
cout<<"5"<<endl;
}
return 0;
}
输出:2
3
4