When we work in C, we have two basic file types: code and headers. Guess which one is supposed to contain our code?
This bears repeating:
DON'T RETURN VOID.
Even when there's no way for a function to fail, return an integer.
Because it allows the user to go on autopilot. If all of your functions return int (except for a few explicitly-named constructors - these can return the desired struct), the end user can just work your code into
Next post should be available on Thursday. I have some stuff to take care of for
There is a law of problem solving which has been passed around since time immemorial. To Einstein, the law looked like this:
If you can't explain it simply, you don't understand it well enough.
However, this law has seen many refinements, and it came down to me in this form:
If you can't explain it in one