It is said that we can use cstdlib and stdlib.h header file as well.
My question is how can we use C language header file to fetch prototype of functions here in CPP too? Are C and CPP header files available for both, in C and CPP too?
It is said that we can use cstdlib and stdlib.h header file as well.
My question is how can we use C language header file to fetch prototype of functions here in CPP too? Are C and CPP header files available for both, in C and CPP too?
For C++, use <cstdlib> & Co. (if necessary). In principle, you cannot rely on C Standard Library headers like <stdio.h> being bundled with your C++ compiler and thus should avoid using them in your code.
Please do not duplicate your posts!!!
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.