There is currently 1 post.
Font size: Small - 100% (Default)  Content converter: No conversion
 
Clicks Replies
1223 0
c语言不能直接用双等号判断两个字符串是否相等
巨大八爪鱼
武林盟主 二十一级
Reply
Floor 1 Posted at: 8/2/13 15:21
应该:
char* a="dMBN";
    char* b="MBN";
    if (strcmp(a,b)==0)
        printf("YES\n");
    else
        printf("NO\n");

注意有个==0
Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
(Shortcut key: Ctrl+Enter)
Post Information
Clicks: 1223 Replies: 0
Author: 巨大八爪鱼
Last reply: 巨大八爪鱼
Last reply time: 8/2/13 15:21
Announcements