From owner-freebsd-questions@FreeBSD.ORG Tue Nov 11 19:25:32 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D636C16A4CF for ; Tue, 11 Nov 2003 19:25:32 -0800 (PST) Received: from endif.cjb.net (65-101-229-205.dnvr.qwest.net [65.101.229.205]) by mx1.FreeBSD.org (Postfix) with SMTP id 12D1743FA3 for ; Tue, 11 Nov 2003 19:25:29 -0800 (PST) (envelope-from end@endif.cjb.net) Received: (qmail 1326 invoked from network); 12 Nov 2003 03:25:28 -0000 Received: from localhost (end@127.0.0.1) by localhost with SMTP; 12 Nov 2003 03:25:28 -0000 Date: Tue, 11 Nov 2003 20:25:28 -0700 From: Robin Schoonover To: Lucas Holt Message-Id: <20031111202528.0cf4b007.end@endif.cjb.net> In-Reply-To: References: <002c01c3a8c1$a4651bb0$6400a8c0@desktop> <002901c3a8c4$5f5e7c70$1200a8c0@gsicomp.on.ca> X-Mailer: Sylpheed version 0.9.6claws (GTK+ 1.2.10; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: Alex Kelly cc: freebsd-questions@freebsd.org Subject: Re: Newbie: The C / C++ Issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2003 03:25:33 -0000 On Tue, 11 Nov 2003 22:02:53 -0500, Lucas Holt wrote: > > > > You can't learn C++ without learning C first. So I'd suggest you > > become intimiately familiar with C, and then move on to the advanced > > concepts and features that C++ provides once you want/need to use them. > > > > -- > > Matt Emmerton > > Thats not entirely accurate. Western Michigan University only teaches > C++, and i can tell you that most C topics like pointers and printf > have never come up in class. C style strings are it, and they didn't > even explain those. This is a common misconception. Pretty much everything in the base language of C is in C++. This includes pointers, so you probably didn't learn C++ completely. printf however, is part of one of the C standard libraries (stdio in this case), not the language itself and not C++ at all (not sure if C++ has variable arg lists though). > you can go your whole life without > printf > only using > cout << "hello world" << endl; Depends on what you plan on doing in your entire life. A simple program written in C probably would have to use printf. Anything in the kernel won't use cout, and even things you would expect in your standard C enviroment have to be specially written for the kernel anyway. And anyway, most pople could go their entire life without cout. Plus, cout may be easier to use for simple things like printing out numbers and strings, but if you want your strings formatted, cout isn't much fun. I'd suggest learning C, and then if you have to, learn C++. -- Robin Schoonover (aka End) # # Free Speech!! While Supplies Last!! -- poulosio@netcom.com #