+ 5
What is the difference between "cmath.h" and "math.h" or "cstdlib.h" and "stdlib.h" ?
3 Answers
+ 24
đ€đ€đ€u mean difference between math.h and cmath ... because there is no such thing as cmath.h
math.h is a C library header.
Its use is deprecated, but works in C++.
cmath is a C++ library header. It has the stuff from math.h in the correct namespace plus a lot more....
basically in C++
the C library header files that have .h as postfix are removed and c is added in the prefix....
so math.h in C became cmath in C++ having few more functions...
stdlib.h in C is similarly same
cstdlib in C++
check out this link for more. đ
https://www.quora.com/What-is-the-difference-between-math-h-and-cmath-What-is-the-difference-between-iostream-and-iostream-h-in-C++
+ 4
đDTđ thanks bro