It's very difficult to answer that question without knowing something about your build environment. Most Make-based systems will chose the compiler based on the file extension, compiling .c code with a C compiler and .C, .cxx and .cpp code with your C++ compiler.