大神请指点

#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
全部评论
为什么 不输出:1                          5
点赞 回复 分享
发布于 2016-03-12 10:56

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务