HiveBrain v1.2.0
Get Started
← Back to all entries
gotchacppCritical

C++ code file extension? What is the difference between .cc and .cpp

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
extensioncppandbetweenthedifferencefilewhatcode

Problem

I have seen C++ code saved as both .cc and .cpp files.

Which of these (or another!) is the best practice/most modern/best to use? The Google style guide seems to suggest .cc, are there any other opinions or options?

I am mainly concerned with programs on Linux systems.

Solution

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.

Context

Stack Overflow Q#1545080, score: 940

Revisions (0)

No revisions yet.