> Why is fgets defined as...
> char *fgets(char *s, int n, FILE *stream);
> instead of
> char *fgets(char *s, size_t n, FILE *stream);
ac> Interesting. Perhaps some bright spark thought the situation where you
ac> would want to read in a string longer than INT_MAX would never arise.
ac> That's not so bad, is it?
I'm not completely sure. Why not just limit everything to INT_MAX?
size_t was created for a reason, and I think that reason is so
that you can declare all your character buffers to use size_t.
Since there's nothing tying size_t to int in any way, I don't know
what combinations you could end up with. BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|