Date: Sun, 29 Dec 1996 13:46:36 +1100 From: davidn@sdev.usn.blaze.net.au (David Nugent) To: francisco@natserv.com (Francisco Reyes) Cc: chat@freebsd.org (FreeBSd Chat list) Subject: Re: Comments on using C++ instead of C Message-ID: <Mutt.19961229134636.davidn@sdev.blaze.net.au> In-Reply-To: <199612290152.UAA28924@revelstone.jvm.com>; from Francisco Reyes on Dec 28, 1996 19:04:38 -0400 References: <199612290152.UAA28924@revelstone.jvm.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Francisco Reyes writes: > I have never programmed for Unix before and am about to start a small > project. I was wondering if there are any advantages of using C over > C++. Different strokes. The environment supports both - enough said really - comparing C/C++ is like comparing any two languages available for a given platform. I tend to look at the task before deciding on which language to use - there is no answer that is "right" all the time. A lot depends on your relative skills in each language too. gcc 2.7.2(.1) provides reasonable support for C++, but not quite "up to date" with the moving target that is the ANSI C++ draft standard. > Does the compiler that comes with FreeBSD do C++? Yes. > I tried compiling a trivial C++ program using gcc and it > failed. Must one send a parameter to gcc to tell it the > code is C++? Name it .cc, .cxx, .cpp, .C or use -xc++ to force compilation as C++. "info gcc" for the documentation. Regards, David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freefall.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19961229134636.davidn>