Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!ames!haven!mimsy!tove.cs.umd.edu!davew From: davew@tove.cs.umd.edu (David G. Wonnacott) Newsgroups: comp.lang.c++ Subject: Re: Learning C++ Message-ID: <29911@mimsy.umd.edu> Date: 5 Feb 91 20:21:21 GMT References: <1108@tesla.njit.edu> Sender: news@mimsy.umd.edu Reply-To: davew@tove.cs.umd.edu (David G. Wonnacott) Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 28 In article <1108@tesla.njit.edu> fer9483@tesla.njit.edu writes: >DO I need to know C before attempting to tackle C++, or can C++ be learned on >its own? You do not need to know C before learning C++. If your final goal is to become proficient with C++, I would recommend that you do NOT start by learning C for 2 reasons: 1) Although you will, in time, learn all the features of C (its a subset of C++), you do not have to learn them first. It is hard to do much in C without knowing the entire language. In particular, it can be hard to understand the I/O facility and the traditional method for handling strings, without an understanding of pointers and memory allocation. If you get a C++ compiler with the stream I/O library and a good string library, you can put off the real subtleties of C & C++ until you are comfortable with coding simple programs. Perhaps even more important in the long run: 2) While the C language is a subset of the C++ language, good C style is not a subset of good C++ style. Much of the difficulty in teaching C programmers to program well in C++ lies in trying to get them to let go of some of the techniques they use all the time in C (I know this from experience -- I spent several years teaching C++ to C programmers). Dave Wonnacott (formerly of AT&T Corporate Education & Training) davew@tove.cs.umd.edu