明明输入正确,但结果都是为假


#include<stdio.h>
void Scrip(char* lead);

int main()
{
    char cSelect[2] = "";
    printf("暗号:");
    scanf_s("%s", &cSelect, 2);
    Scrip(cSelect);
    return 0;
}

void Scrip(char* lead)
{
    if (lead == "张三")
        printf("%s暗号正确\n", lead);
    else
        printf("枪毙");
        
}
//你们学C语言的书,是什么啊,我买了很五六本,因为我用的是Visual Studio 2019,很多函数都是运行不了,严重影响学习
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/439235694446115.jpg "#left")

img

字符串不能用==直接比较,要用strcmp函数!

字符串比较得用strcmp函数