int *test = new int(10);

    cout << test << endl;                //輸出指標指向的位置
    cout << &test << endl;             //輸出指標存放的位置
    cout << (int *)test << endl;      //輸出指標指向的位置
    cout << *(int *)test << endl;    //輸出指標指向的位置的值
    cout << (void *)test << endl;   //輸出指標指向的位置

arrow
arrow
    全站熱搜

    大神(偽) 發表在 痞客邦 留言(0) 人氣()