How do you put C header files into C++ source code?
thanks.
How do you put C header files into C++ source code?
thanks.
I mean like, #include <conio.h> how do you translate that into a C++ #include
It's the same.
Yes. ALL of the standard C headers are included in the ANSI/ISO C++ language standard.
To be up-to-date, you should add a leading 'c' and delete the '.h' like this:
#include <math.h> /* This is C */
#include <cmath> // This is C++
I think you have to be in namespace std to use the C++ header names. (?)
BTW - conio.h in NOT in either standard. So your compiler might not have it, although it is quite common. And, don't try <cconio>.
Last edited by DougDbug; 05-20-2005 at 02:26 PM.
Yes, all of the standard functions in C are in the std namespace in C++.Originally Posted by DougDbug
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein