Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > cxx file extension
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 30th October 12:56
fchartrand
External User
 
Posts: 1
Default cxx file extension



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! ]
  Reply With Quote


 


2 8th November 22:19
patrick leslie polzer
External User
 
Posts: 1
Default cxx file extension



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! ]
  Reply With Quote
3 8th November 22:20
troels henriksen
External User
 
Posts: 1
Default cxx file extension


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! ]
  Reply With Quote
4 8th November 22:21
brangdon
External User
 
Posts: 1
Default cxx file extension


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! ]
  Reply With Quote
5 17th November 12:22
External User
 
Posts: 1
Default cxx file extension


..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! ]
  Reply With Quote
Reply


Thread Tools
Display Modes




666