Reputation: 54
Basically I have three char**: **A, **B and **C. I want to make a pointer that shows A,B and C like this:
ptr[0] will be **A
ptr[1] will be **B;
ptr[2] will be **C;
so if I add one at ptr it will show me the next array. And if this is possible then how I can represent A[i][j] with the pointer?
Upvotes: 0
Views: 157
Reputation: 272717
It sounds like you want something like this:
char **ptr[] = { A, B, C };
char x = ptr[0][i][j]; // x is now equal to A[i][j]
Upvotes: 2