array of pointers

Posted by tushar on Stack Overflow See other posts from Stack Overflow or by tushar
Published on 2010-04-20T18:13:37Z Indexed on 2010/04/20 18:23 UTC
Read the original article Hit count: 384

Filed under:
|
char *a[]={"diamonds","clubs","spades","hearts"};
char **p[]={a+3,a+2,a+1,a};
char ***ptr=p;
cout<<*ptr[2][2];

why does it display h and please explain how is the 2d array of ptr implementing and its elements

© Stack Overflow or respective owner

Related posts about c++

Related posts about pointers