C++ code file extension? .cc vs .cpp

Jessica picture Jessica · Oct 9, 2009 · Viewed 406.6k times · Source

I have seen C++ code saved as both .cc and .cpp files. Is there a difference between the two?

The Google style guide seems to suggest .cc, but provides no explanation.

I am mainly concerned with programs on Linux systems.

Answer

JaredPar picture JaredPar · Oct 9, 2009

At the end of the day it doesn't matter because C++ compilers can deal with the files in either format. If it's a real issue within your team, flip a coin and move on to the actual work.