Paul <
peps...@gmail.com> writes:
> I read that A c3(A()); creates a function declaration for a function
> c3 that returns an A and that takes a function pointer to a function
> returning an object of type A
>
> I thought pointers had to be indicated by *.
It's a good idea to be explicit but it's not necessary:
8.3.5 Functions
5. [...] After determining the type of each parameter, any parameter
of type "array of T" or "function returning T" is adjusted to be
"pointer to T" or "pointer to function returning T,"
respectively. [...]
> Wouldn't the above function declaration be written A c3(A (*()));
No, it would be A c3(A (*)()); if you wanted to show the pointer
explicitly.
--
Ben.