+ 4
Can I include both C and C++ header file in a same program. Does this program works?
#include <stdio.h> #include <iostream.h> using namespace std; int main(){ printf(" Hello\n"); cout<<" World"<<endl; }
4 odpowiedzi
+ 21
C headers are compatible in C++, so yes. You can also find the counterparts of C headers in C++, e.g. <stdio.h> is <cstdio> in C++, but the former can also be used.
+ 7
If you are using a c++ compiler yes. All features of c are included in c++.
+ 3
MANY programs do this so yes