Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Nov 2003 20:25:28 -0700
From:      Robin Schoonover <end@endif.cjb.net>
To:        Lucas Holt <luke@foolishgames.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Newbie: The C / C++ Issue
Message-ID:  <20031111202528.0cf4b007.end@endif.cjb.net>
In-Reply-To: <B55865F2-14BC-11D8-913B-0030656DD690@foolishgames.com>
References:  <002c01c3a8c1$a4651bb0$6400a8c0@desktop> <002901c3a8c4$5f5e7c70$1200a8c0@gsicomp.on.ca> <B55865F2-14BC-11D8-913B-0030656DD690@foolishgames.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 11 Nov 2003 22:02:53 -0500, Lucas Holt <luke@foolishgames.com>
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
#



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031111202528.0cf4b007.end>