If we search the longest possible string for the terminating nul and get back SIZE_MAX, does that mean we found it or not?
Not, because for a maximum length string it would return SIZE_MAX - 1.
SIZE_MAX - 1
Ah! Off by one in my calculations.
Mind you, I still agree with you about pointers being more useful.
A comparison between two interfaces that use in-band error values.
Not, because for a maximum length string it would return
SIZE_MAX - 1.Ah! Off by one in my calculations.
Mind you, I still agree with you about pointers being more useful.
A comparison between two interfaces that use in-band error values.