Question: what is the difference between size_t and int?
Answer: size_t implies the size of an object, and usually matches the processor address size which is often 64 bits. int is a signed integer, and is usually only 32 bits on 64 bit systems which is less than you need to store the size of some objects.