指向数组的指针

#include <iostream>

using namespace std;
int main()
{
    int A[2][5]={{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}};
    int (*p_a)[5];
    p_a = &A[1];
    cout<<*((*p_a)+2)<<endl;
    cout<<(*p_a)[2]<<endl;
//    int &b=a;
//    cout<<sizeof(b)<<endl;
//    cout<<"hello world!"<<endl;
    return 0;
}
原文地址:https://www.cnblogs.com/rocklee25/p/7348176.html