Path: utzoo!censor!dybbuk!yunexus!ists!helios.physics.utoronto.ca!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!amdcad!sun!morocco!landauer From: landauer@morocco.Sun.COM (Doug Landauer) Newsgroups: comp.lang.c++ Subject: Re: C++ filename convention Message-ID: <130133@sun.Eng.Sun.COM> Date: 11 Jan 90 19:34:12 GMT References: <2277@dataio.Data-IO.COM> <335@cvbnet.Prime.COM> Sender: news@sun.Eng.Sun.COM Reply-To: landauer@sun.UUCP (Doug Landauer) Organization: Sun Microsystems, Mountain View Lines: 37 > Is there a definitive filename convention in C++? No. > Zortech uses .cpp and .hpp, while others use .cxx > and .hxx. Still, others use the C naming convention > of .c and .h. Zortech .cpp .hpp ??? .c++ .h++ Glockenspiel .cxx .hxx AT&T .c .h AT&T .C .h G++ .cc .h Sun C++ allows any of the above, but prefers .cc and .h > Which is correct? Depends on which compiler/translator you use. There is no consensus. There are problems with all of them: .cpp "cpp" is the traditional Unix name for the C preprocessor .c++ not always a valid filename (e.g. on some non-Unix systems) .cxx too hard to type .c bad for makefiles and other tools (e.g. Sun's NSE) .C not always different from .c (e.g. on many non-Unix systems) .cc Concurrent C I personally prefer .cc, since its problem seems to be the easiest to live with, especially for the vast majority of C++ users out there, who (as far as I can tell) have no intention of ever using Concurrent C. -- -- (These are my opinions; they may or may not match those of Sun.) -- Doug Landauer -- Sun Microsystems, Inc. -- SPD, SET, Languages landauer@eng.sun.com or ...!sun!landauer "Think Globally -- Shop locally!"