if I'm using the sizeof
operator and making use of size_t
in my code, do I have necessarily have to include stddef.h
? I haven't included stddef.h
, and my code compiles without warning with both MVS2008 and with Borland C++ BuilderX.
Thanks a lot...
sizeof()
, while looking like a function call, is actually an operator and part of the language core. No include needed.
size_t
is defined in various headers: stddef.h
, string.h
, stdlib.h
, and stdio.h
. Including any one of them is enough to use size_t
in your code.