La différence entre .cc et .cpp
Hello,
can someone tell me the difference between a .cc file and a .cpp file
because I'm having trouble compiling a .cc file on Visual C++. How can I get them to compile????
thank you for your help
can someone tell me the difference between a .cc file and a .cpp file
because I'm having trouble compiling a .cc file on Visual C++. How can I get them to compile????
thank you for your help
Configuration: Windows XP Firefox 2.0.0.13
9 answers
-
ModeratorIt seems to me that .cc is a C++ extension that works under g++ (the C++ compiler of gcc).
-
-
@C++Rename them to .cpp using the utilities I provided you earlier. I believe it's the only solution.
-
@luffy duckSure, here is the translation: Ok, so I need to rename them all,
but if I change the Visual compiler to another one, I think it will work, right?
Can you give me an example of a compiler and where to find it?
Thank you infinitely for all your help
:) -
Moderator@C++Try Dev C++ if you want. The cc extensions will work with it.
-
@kilianou g++ for Windows ^^
-
-
Well, if it works with ".cpp" files, you can write a small batch script to rename your files and give them a .cpp extension
or there are already existing utilities:
https://www.gratuiciel.com/gratuit/systeme_autres/
because it's even nicer to have source files with the .cpp extension!!! ^^ -
ModeratorHi,
There doesn’t seem to be any difference (at least for compilers like g++). As for Visual, I don't know. -
Hi,
apparently it should work under Visual as well. Is there an error message? -
Eh bien, écris-toi un petit script pour renommer tes fichiers en .cpp, ce sera plus propre comme ça ;-)
-
What is a .cc file then?
To be honest, I had never seen one... Maybe a mix between C and C++, so the coder hesitated between .c and .cpp, and chose something in between ^^
And the reason he doesn't want to open it, I find that a bit strange... and I don't have Visual on hand to test. Is it the express version? -
Yep, it seems to be that indeed. In the link you provided earlier:
C++ programs should end with the extensions .C, .cc, .cpp, or .cxx
and it seems to only be for the compilers: Sun C Compiler, CC, C++ Compiler. -
So what should I choose?
Which version is the easiest to use? -
ModeratorDev C++
-
-
-
Moderator@C++Yes, of course :-)
-
-
@C++Hello,
for your case, you can rename your .cc files to .cpp using the command ( REN *.cc *.cpp ) or
( RENAME *.cc *.cpp ) and it will rename all the files at once, of course only the files in the same folder!!
so you can keep your Visual Studio without the need to install Dev C++!!
good luck
-