![]() |
|
|
|
|
1
30th October 12:56
External User
Posts: 1
|
Hi,
I recently see people using .cxx file to develop in C++. Is there anybody who know the difference between using a .cpp file and .cxx file (Windows)? Thanks [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|
|
|
2
8th November 22:19
External User
Posts: 1
|
If this is a platform-specific question, you should write to a more
appropriate newsgroup. If not, the answer is that there isn't any difference. Leslie [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|
3
8th November 22:20
External User
Posts: 1
|
fchartrand@avantas.com (Francois Chartrand) writes:
There isn't really one. Some compilers refuse to compile files with an invalid suffix (cpp, cxx, C and C are usually safe), but that's about it. As long as you keep consistent, there shouldn't be an issue. -- _ _ /'< Troels "Athas" Henriksen >'\ /_v/ "In void* we trust." \v_\ "" "" [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|
4
8th November 22:21
External User
Posts: 1
|
I doubt there is a difference, other than local convention.
In the olden days, there was no established convention. Some people used "xx" because it looks a bit like "++"; they didn't want to use actual "++" because of potential problems (eg if the local commandline shell uses + for regular expressions). I've not seen it recently, but I daresay this convention persists. -- Dave Harris, Nottingham, UK [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|
5
17th November 12:22
External User
Posts: 1
|
..C is not necessarily safe. On a system where filenames are
case insensitive, the compiler will normally compiler .C as a C file, not a C++ file. All compilers I know of also have an option to allow explicit specification of the language. Thus, in VC++, /Tp, or with g++, -x c++, will ensure that the next (or following, in g++) files will be considered C++, regardless of their extension. -- James Kanze GABI Software http://www.gabi-soft.fr Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung 9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|