Closed stlou closed 8 years ago
the "usage" thing is new to people, explain it a little
@stlou The point of the validation is that you should never access an array at an index that is beyond the bounds of the array:
string input = argv[1];
You only want to do the above if you know for sure that argv
actually does contain a value at index 1
.
Should I add some explanation for this?
I added some //comments
which should provide sufficient clarification of both things:
What's the point of the validation in previous.c?
We have it print, "please provide me one integer" and then in a new line "usage: previous n", which just seems kind of weird. What's that second line saying?
Also a small typo, need an apostrophe in don't