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 in C++ by Nicholas
• 2,520 points
4 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 by Damon
• 4,240 points

Related Questions In C++

0 votes
0 answers

What is the C++ function to raise a number to a power?

What's the best way to raise a n ...READ MORE

Jun 1 in C++ by Nicholas
• 2,520 points
17 views
0 votes
1 answer

What is the best way to use a HashMap in C++?

The ordered and unordered map containers (std::map and std::unordered map) are included in the standard library.  The items in an ordered map are sorted by key, and insert and access are in O (log n).  For ordered maps, the standard library often use red black trees.  However, this is only an implementation detail.  Insert and access are in O in an unordered map (1).  It is simply another term for a hashtable. An illustration using (ordered) std::map: #include <map> #include <iostream> #include <cassert> int main(int argc, char ...READ MORE

answered Jun 10 in C++ by Damon
• 4,240 points
21 views
0 votes
1 answer

What is the name of the "<<" and ">>" operators? [duplicate]

According to cplusplus.com's documentation: This operator (<<) applied to ...READ MORE

answered Jun 20 in C++ by Damon
• 4,240 points
7 views
0 votes
1 answer

What is a Class and Object in C++?

A Class is like a blueprint, an ...READ MORE

answered Jun 21 in C++ by Damon
• 4,240 points
13 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,080 points
191 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,080 points
1,373 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
788 views
0 votes
1 answer

Invalid method parameters for eth_sendTransaction

params needs to be an array, try {"jsonrpc":"2.0","method":"eth_se ...READ MORE

answered Sep 28, 2018 in Blockchain by digger
• 26,720 points
589 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 in C++ by Damon
• 4,240 points
16 views
0 votes
1 answer

Difference between Turbo C++ and Borland C++ compiler [closed]

I will try my best to respond, ...READ MORE

answered Jun 21 in C++ by Damon
• 4,240 points
8 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP