When I want to use size_t in C++, should I include or ? I have heard several people saying that
I prefer #include .
Some of the names in the C headers are allowed to be macros, but the set differs from the C rules. In C, EXIT_FAILURE, isdigit(), getc() a.o. are macros. Do you know which ones are macros in C++?
Secondly, only a couple standard C headers are required to have the header, Posix headers are not. Do you know which headers are standard and which ones are provided by your compiler only?
Thirdly, when using headers from a third-party C library, you will end up with #include , and I prefer not to mix and .
Fourthly, the current draft for the new C++ standard says that is allowed to dump the symbols into the global namespace (because apparently many compilers already do so nowadays), so using #include is not a guarantee that the global namespace will be unpolluted in the future. So I would advice that when writing portable code, you should assume the global namespace will be affected (even though it is not allowed now). As only a few experts seem to know this (see the discussion in the comments here), it is better to use as even a beginning C++ programmer will understand that it pollutes the global namespace.