A general programming discussion community.
Rules:
- Be civil.
- Please start discussions that spark conversation
Other communities
Systems
Functional Programming
Also related
- 0 users online
- 5 users / day
- 14 users / week
- 44 users / month
- 138 users / 6 months
- 1 subscriber
- 336 Posts
- 544 Comments
- Modlog
1
2 is a function header followed by the opening curly brace of a function body
deleted by creator
If a function is declared but not implemented it’ll usually cause a linking error… And sometimes (with older compilers) a runtime error.
The standard here is that the declaration (1) would be in a .h file that other .c files might reference while the implementation (2) would be in a .c so it is only built once into a .o file during compilation & linking.