There are several filename extensions that are recognised as denoting C++ source code files. .cpp is one of the more common ones with .h for the header files. The .h is for both C and C++, .hh or .hxx are sometimes used for C++ headers files.
.cc, .C, .cxx are just a few alternatives to using .cpp, there are others. They are all just file naming conventions, the code in them does not vary between files with different file extensions.