C code file extension What is the difference between cc and cpp closed

0 votes
C++ code has been saved as both.cc and.cpp files. Is there a distinction between the two?

The Google style guide appears to suggest.cc, but no rationale is provided. I'm mostly interested in apps that run on Linux platforms.
Jun 20, 2022 in C++ by Nicholas
• 7,760 points
1,195 views

1 answer to this question.

0 votes
GNU GCC recognizes all of the following as C++ files and will utilize C++ compilation whether invoked with gcc or g++:

C, C++, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP, CPP,

The.C - case is important in GCC;.c is a C file, whereas.C is a C++ file (if you let the compiler decide what it is compiling that is).

Other suffixes are supported by GCC to signal specific processing; for example, a.ii file will be built as C++ but will not be pre-processed (intended for separately pre-processed code).

All recognized suffixes are listed at gcc.gnu.org.
answered Jun 21, 2022 by Damon
• 4,960 points

Related Questions In C++

0 votes
0 answers

What is the difference between Java and C++?

What is the difference between Java and ...READ MORE

Jul 22, 2022 in C++ by Nicholas
• 7,760 points
245 views
0 votes
0 answers

What is the difference between std::list<std::pair> and std::map in C++ STL?

What distinguishes std::list<std::pair> from std::map? Does the ...READ MORE

Aug 17, 2022 in C++ by Nicholas
• 7,760 points
286 views
0 votes
1 answer

What is the difference between std::__gcd and std::gcd?

I done some research about this. The ...READ MORE

answered Jun 10, 2022 in C++ by Damon
• 4,960 points
1,349 views
0 votes
0 answers

What is the difference between ifstream, ofstream and fstream?

I stumbled discovered ifstream, ofstream, and fstream ...READ MORE

Jul 11, 2022 in C++ by Nicholas
• 7,760 points
549 views
0 votes
1 answer

What is the extension of java code files?

Java source code files often have the ...READ MORE

answered Oct 11, 2023 in Java by anonymous
• 3,320 points
1,192 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 11, 2018 in Python by Priyaj
• 58,090 points
495 views
0 votes
1 answer

setuptools: build shared libary from C++ code, then build Cython wrapper linked to shared libary

There is a seemingly undocumented feature of setup that ...READ MORE

answered Sep 21, 2018 in Python by Priyaj
• 58,090 points
2,138 views
0 votes
1 answer

How to pass large records to map/reduce tasks?

Hadoop is not designed for records about ...READ MORE

answered Sep 25, 2018 in Big Data Hadoop by Frankie
• 9,830 points
1,215 views
0 votes
1 answer

What is the difference between public, private, and protected inheritance in C++?

To begin answering that question, let me characterise member accessors in my own terms.  If you already know this, proceed to the section "next:". I'm aware of three types of accessors: public, protected, and private. Let: class Base { public: ...READ MORE

answered Jul 11, 2022 in C++ by Damon
• 4,960 points
565 views
0 votes
1 answer

What is the difference between operator overloading and operator overriding in C++?

Some people use the latter word to ...READ MORE

answered Aug 2, 2022 in C++ by Damon
• 4,960 points
1,679 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP