int myArray[5] = {3};
const int (*s)[5] = &myArray;
'int myArray[5]' has a different type than 'int *myArray'. Sometimes the first type will be converted by the compiler to the second type. This conversion is sometimes called 'decay.' In this case 'decay' means loss of type information.
References:
C++ Templates
http://cpptruths.blogspot.com/2005_06_01_archive.html
No comments:
Post a Comment