Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Correct C++ file extension [duplicate]

Tags:

c++

Possible Duplicate:
Correct C++ code file extension? .cc vs .cpp
.c vs .cc vs. .cpp vs .hpp vs .h vs .cxx

I have written C++ code in files with extension .cpp, .cc or .cxx

Can anyone explain that what is the difference between these three and which one is the best ( is that platform dependent ) and why?

I am currently working on cygwin.

like image 923
Rog Matthews Avatar asked Dec 28 '22 05:12

Rog Matthews


1 Answers

It's a matter of code conventions. These extensions are all interchangeable (as far as platforms are concerned). If you participate in an existing project, you should adhere to this project's conventions, otherwise just choose whatever you like.

like image 181
user1071136 Avatar answered Dec 29 '22 17:12

user1071136