When I use functions inherited from C, like the ones in <cmath> or <cstdlib>, should I qualify them as being part of the standard namespace std::log, or should I remain in the C-scope and use them as global functions? What about size_t?
When I use functions inherited from C, like the ones in <cmath> or <cstdlib>
Share
If you use e.g.
<math.h>No, you shouldn’t.
It is unspecified whether they are available in the namespace
stdon any particular implementation:However, you should not be using this header:
If you use e.g.
<cmath>Yes, you should.
It is unspecified whether they are available in the global namespace on any particular implementation: