Is actually a problem, gcc can compile .c file, if you named .cpp, then this will be gcc compiler error occurs.
In this situation:
1 (or can be compiled .c .c ++) with g ++ compiler
2. still using gcc compiler, but the file suffix to .c
Is actually a problem, gcc can compile .c file, if you named .cpp, then this will be gcc compiler error occurs.
In this situation:
1 (or can be compiled .c .c ++) with g ++ compiler
2. still using gcc compiler, but the file suffix to .c