isSameChar

#include <iostream>
#include <vector>


using namespace  std;




int main()
{
    const char p1 = '123';
    const char p2 = '123';

    const char* p3 = "123";
    const char* p4 = "123";

    char* p5 = "123";
    const char* p6 = "123";

    char* const p7 = "123";
    const char* p8 = "123";

    char* p9 = "123";
    char* p10 = "123";
    cout << (p1 == p2) <<endl;//1
    cout << (p3 == p4) <<endl;//1

    cout << (p5 == p6) <<endl;//1
    cout << (p7 == p8) <<endl;//1
    cout << (p9 == p10) <<endl;//1

    getchar();
    return 0;
}

posted @ 2021-10-25 21:37  Kiris  阅读(27)  评论(0)    收藏  举报