Strange C Function Syntax
The other day I saw some code C which I thought to be clearly wrong:
The other day I saw some code C which I thought to be clearly wrong:
Currying is not part of the C language. A few alternatives are shown that
can be used: Global variables, GCC extensions, code duplication, void
pointers, variable argument lists, and general parameter structs. Also
C++03 and C++11 examples are given.
Whenever you open a file with fopen
, you get a FILE *
which is your handle
to the file you just opened. Some people tell you to always run fclose
on the
file handle such that the file is closed.