Any reason for that, what is .cc for?
views:
117answers:
2C++ is the ultimate language of choice and flexibility and C++ developers like to be different. The .cc extension is just one of the many that people choose for header and source files. Some others I've seen.
- No extension: Popular with header files
- .h
- .hpp
- .cpp
- .cc
- .c
- .C (explicit capital on case sensitive file systems)
- .cxx
- .inl (for inline templates)
Which to use is merely a matter of preference. There is no inherent gain from choosing one extension over the other.
The only real effect the extension has is to kill a team's productivity for a day or two while they debate the best one to use.
I'm not aware for a deep reason for it other than that the string "c++" makes a poor extension on many OSes. :-) I believe these conventions developed before there was a standard, and because the language and compilers themselves generally don't ascribe any particular meaning to the extensions of the source files, no standard was ever necessary. .cc might originally have been a reference to "C with Classes," but that's speculation on my part (and maybe Joe's).
.cc, .cpp, and .cxx are all common extensions for C++ source files.