"Christopher Benson-Manica" <at***@nospam.cyberspace.org> wrote
Malcolm <ma*****@55bank.freeserve.co.uk> spoke thus:
char (*A)[4] is what you want, but this syntax is horrible. 2d arrays in
C, beyond the very simplest declaration, are horrible.
What most programmers would do is declare
char *A;
Is the syntax really that bad? I would think your original
declaration would do a better job of conveying to an informed reader
that you have a dynamic array of 4 byte arrays...
Yes it is. If you follow the ng you will see that there is a steady trickle
of newbies hopelessly confused by C's multi-dimensional arrays, largely
because most introductory textbooks introduce the 2d array at the same time
as the 1d array.
char (*A)[4] is gibberish. No-one should be expected to follow such a
construct, or use it in real code. Even the informed reader, who can work
out what it means, will find it hard to read and make mistakes.