Free Wildebeest Free Wildebeest - 1 year ago 117
C++ Question

What's the difference between cstdlib and stdlib.h?

When writing C++ code is there any difference between:

#include <cstdlib>


#include <stdlib.h>

other than the former being mostly contained within the

Is there any reason other than coding standards and style to use one over the other?

Answer Source

The first one is a C++ header and the second is a C header. Since the first uses a namespace, that would seem to be preferable.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download