2 ms·
When writing in C, usually you either know the function well enough (including having just written it) to have memorised the arguments, have another window cont
by userbinator 12y ago
When writing in C, usually you either know the function well enough (including having just written it) to have memorised the arguments, have another window containing the declarations, or else you'll be using an IDE that tells you what the arguments are (along with a lot of other information.)
- nitrogen 12y agoThe most frustrating thing in C or C++ is when a header file is missing all of the argument names, so the declarations are just OVERKILL_TYPEDEF_PTR_T somefunc(TYPE1_T, TYPE2_PTR_T, void *); I always document my functions in the headers, especially for private code only I will use. E.g. /* * Like vfprintf(), but prepends a timestamp and the name of the current thread * or process. The output FILE will be locked using lockf() while the * timestamp, thread name, and message are written. The thread name can be set * using set_threadname(). */ int vfptmf(FILE *out, const char *format, va_list args);