mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
clarify that args' names are not required in proto
with obligatory conventional warning
This commit is contained in:
parent
8ec133b295
commit
223c8140a0
@ -54,6 +54,8 @@ int function_2(void);
|
|||||||
// Must declare a 'function prototype' before main() when functions occur after
|
// Must declare a 'function prototype' before main() when functions occur after
|
||||||
// your main() function.
|
// your main() function.
|
||||||
int add_two_ints(int x1, int x2); // function prototype
|
int add_two_ints(int x1, int x2); // function prototype
|
||||||
|
// although `int add_two_ints(int, int);` is also valid (no need to name the args),
|
||||||
|
// it is recommended to name arguments in the prototype as well for easier inspection
|
||||||
|
|
||||||
// Your program's entry point is a function called
|
// Your program's entry point is a function called
|
||||||
// main with an integer return type.
|
// main with an integer return type.
|
||||||
|
Loading…
Reference in New Issue
Block a user