Liste des Groupes | Revenir à cl c |
"int", "void" and "double" are totally different types in my view. "int", "pointer to int", "array of int", "function returning int" all have a relation that means I would not describe them as /totally/ different types - though I would obviously still call them /different/ types.What about 'array of int', 'array of double' and 'array of void*'; do they have a relation too?
>
That's a separate problem. But without forward declarations, at some point you're going to add some expression in the middle of the file, but find you're calling a function which is declared later on in the file rather than earlier.Function declarations outside header files are valid, but tend to beA function definition - as typically written - is also a function declaration. So presumably you mean non-defining declaration here.
rare in well-written C code.
>
Some people have a style where they write forward declarations of all functions defined in a C file near the top of the file. I am not a fan of that myself - especially as over time, this redundant information is rarely kept fully in sync with the rest of the code.
Les messages affichés proviennent d'usenet.