On Mar 13, 4:18 pm, julvr <nos...@ulvr.comwrote:
What exactly does the following do (and what memory does it allocate?)
int (*varname)[4][4];
C++'s declaration syntax (inherited from C) is
indeed a nightmare. You should definitely read
Chapter 3 of Peter van der Linden's "Expert C
Programming", a wonderful and hilarious book which
gives a nice decoder ring for making sense
of these things (the one you mentioned isn't
anywhere near as bad as it gets when pointers
to functions get involved).
Also, check out SPECS, which is a syntax-change-only
reskinning of C++ (with an amusing nod to C++'s original
name). I'm not suggesting you program in it, but
it's nice to realize that the declaration syntax
is historical cruft from a failed experiment, not
something inherently unsound about the language.
http://en.wikipedia.org/wiki/Signifi...C%2B%2B_Syntax
Sean