Article View: comp.lang.c.moderated
Article #2501Re: Pointers to functions
From: Andreas Schwab
Date: Fri, 05 Apr 1996 00:29
Date: Fri, 05 Apr 1996 00:29
24 lines
1427 bytes
1427 bytes
In article <4jttba$3gt@solutions.solon.com>, Lloyd Hopkins <Lloyd@bomber.demon.co.uk> writes:
|> I am having some difficulty with some of the examples in 5.12. The first
|> few are straight forward enough, but (for example):
|> char (*(*x[3])())[5]
|> is pretty confusing to figure! I'll print out your advice and take a look
|> at it again.
Take this apart from inside out, and you'll get:
x is
x[3] an array of three
*x[3] pointers pointing to
(*x[3])() a function (taking an unspecified number of
arguments) returning
*(*x[3])() a pointer to
(*(*x[3])())[5] an array of five
char (*(*x[3])())[5] characters
--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
Technical Details
Message-ID:
<4k1pi4$4tg@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailReferences:
<4jol6u$1sn@solutions.solon.com> <4jq1ef$a2u@solutions.solon.com> <4jttba$3gt@solutions.solon.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: schwab@lamothe.informatik.uni-dortmund.de (Andreas Schwab) Newsgroups: comp.lang.c.moderated Subject: Re: Pointers to functions Date: 4 Apr 1996 18:29:56 -0600 Organization: Dortmund University, Germany Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4k1pi4$4tg@solutions.solon.com> References: <4jol6u$1sn@solutions.solon.com> <4jq1ef$a2u@solutions.solon.com> <4jttba$3gt@solutions.solon.com> Reply-To: schwab@issan.informatik.uni-dortmund.de NNTP-Posting-Host: solutions.solon.com X-Newsreader: Gnus v5.0.15