difference between .cpp and .cc file

What is difference between .cpp and .cc file?

I know both can be compile but what is difference of these two?

Which one is more preferable than another one?

There's no difference. Other equivalent extensions are .cxx, .c++, .C (not .c)

The choice is mostly arbitrary, but try to avoid .c++, since it may cause problems for some tools, and .C, since some platforms use case-insensitive file names.
.cpp, .cc, and .cxx are all fine, but pick just one for a single project, just for consistency.
In the Windows world .cpp is the more common of the three (well, it's Visual Studio's default.)

Andy
Topic archived. No new replies allowed.