string::size_type instead of int
A short holds numbers too. As does a signed char. But none of those types are guaranteed to be large enough to represent the sizes of any strings. string::size_type guarantees just that. It is a type that is big enough to represent the size of a string, no matter how big that string is. For … Read more