According to cppreference.com size_t
is defined in several headers, namely
<cstddef>
<cstdio>
<cstring>
<ctime>
And, since C++11, also in
<cstdlib>
<cwchar>
First of all, I wonder why this is the case. Isn't this in contradiction to the DRY principle?
Which one of the above headers should I include to use size_t
? Does it matter at all?