Use the File Types preference panel to define which file extensions are linked to specific languages.
Coding aids
Customizing the C/C++ editor
C/C++ editor preferences