Liste des Groupes | Revenir à cl c |
On 12/04/2025 01:13, bart wrote:But... but... but...!!!On 11/04/2025 22:36, Keith Thompson wrote:If only C had a way to make that simple and clear.bart <bc@freeuk.com> writes:>
[...]Rubbish. Everyone finds C declaration syntax a nightmare.>
Rubbish. I find C declaration syntax annoying, not a "nightmare".
>
Annoying would be having to get letter case or punctuation just right.
>
But C typepecs can go far beyond it. I can just about do arrays of pointers, or pointers to arrays. Anything more complicated is pretty much trial and error.
>
In an example in my post which I then deleted (DB will just ignore examples), I wanted to create an array of 10 pointers to functions that take an int and return an int.
Oh, wait - it does....Finally!
typedef int (*FIntInt)(int);Just one tiny point, though. I've never been a fan of hiding pointers behind typedefs. I would much prefer:
FIntInt funcs[10];
Les messages affichés proviennent d'usenet.