mikelinyoho wrote:
#include <stdio.h>
#include "test1.c"
#include "sample.cpp"
int main(void){
output();
output();
testmain();
--
getchar();
return 0;
}
#include"test1.c"
#include"sample.cpp"
include *.c and *.cpp at the same time?
If you compile as a C++ program (using a C++ compiler) it may compile.
A C only compiler (or one compiling as C) will reject the contents of
the
"sample.cpp" file, if they contain C++ code.
Although 'include' files can have any suffix, their contents must be
syntactically and semantically correct for the particular program in
which they are included, under a particular compiler operating under
particular switches. The programmer has to figure it out.