In this case, depending upon what your use case is, you might be better off using int (or long long) for s1 and s2. There are some functions in c/posix that could/should use size_t, but don't because of … If the size of the int is that important one can use int16_t, int32_t and int64_t (need the iostream include for that if i remember correctly).

I think size_t is defined in the standard to be an unsigned integer type, but doesn't require it to be the same as any of unsigned {char, short, int, long, long long}. In several c++ examples i see a use of the type size_t where i would have used a simple int. What's the difference, and why size_t should be better? The file size does not reflect the real database size. In fact, after deleting entries from a table, the file is not shrunk; Instead, it contains unallocated space that the engine will reuse by the next occasion. So, the size of size_t is not specified, only that it has to be an unsigned integer type.

In fact, after deleting entries from a table, the file is not shrunk; Instead, it contains unallocated space that the engine will reuse by the next occasion. So, the size of size_t is not specified, only that it has to be an unsigned integer type. However, an interesting specification can be found in chapter 7. 18. 3 of the standard: Limit of size_t size_max …