c++指针相等的问题

#include "stdafx.h"
#include <iostream>
#include <string>

using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{


    string test("just a test");

    string* ptrOne=&test;
    string* ptrTwo=&test;

    string** ptr=&ptrOne;

    cout<<ptr<<endl;

    cout<<ptrOne<<""r"n"<<ptrTwo<<endl;

    if(ptrOne==ptrTwo)
        cout<<"it is the same address"<<endl;

    cin>>test;

    return 0;
}
原文地址:https://www.cnblogs.com/bayonetxxx/p/1575038.html