Article View: alt.msdos.programmer
Article #895Re: Newbie Wants Advice on C-Programming
From: Paul Johns
Date: Tue, 29 Dec 1992 03:50
Date: Tue, 29 Dec 1992 03:50
51 lines
2531 bytes
2531 bytes
It's up to you whether you learn C or C++ first. Anything you learn in C will apply to C++, so you won't hurt yourself by learning C first. A lot would depend on the book you choose. Many C++ books assume you know C. **BUT**, whatever you do, ALWAYS use a C++ compiler, even if you're programming in C. C++ has much stronger type-checking than C does, and it will catch many errors that would cause your system to crash. You may even find bugs in your book's examples! Because of this type-checking, C++ is an appropriate language for beginning computer science students, and it's used that way at some universities. C is much more difficult as a first language. If you do C++, **DON'T** try to create your own classes, particularly classes with dynamic data, until you understand C pointers well. But it's OK to use someone else's class libraries (such as for strings or complex numbers or whatever). And it's OK to do very simple classes. Using someone else's well-designed classes is some of the easiest programming you can do; writing your own non- trivial classes is some of the hardest programming you can do. Finally, while it's true that neither C nor C++ have an exponentiation operator, the standard library DOES come with a function that does exponentiation. While it makes the syntax look a little funny, you can write anything you can write in FORTRAN given the pow() function and a complex number class. In addition to the books already mentioned, I like the Waite Groups C Primer Plus and C++ Primer Plus books. I tried to use K & R once for a community college class and changed texts the very next term. The examples are fabulous in K & R, but the text is overly terse for many people. The tutorials that come with the Microsoft compiler are, IMHO, excellent. BTW, it's MUCH easier to use it under Windows than under DOS and the performance is really quite good. // Paul Johns
Technical Details
Message-ID:
<1992Dec29.035013.18103@microsoft.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!microsoft!wingnut!pauljoReferences:
<1992Dec28.051247.11699@grebyn.com> <1992Dec25.073517.16089@grebyn.com> <1992Dec27.031740.27262@mole-end.matawan.nj.us> <1992Dec28.003320.5437@sequent.com>Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!wingnut!pauljo From: pauljo@microsoft.com (Paul Johns) Subject: Re: Newbie Wants Advice on C-Programming Message-ID: <1992Dec29.035013.18103@microsoft.com> Date: 29 Dec 92 03:50:13 GMT Organization: Microsoft Corp. References: <1992Dec28.051247.11699@grebyn.com> <1992Dec25.073517.16089@grebyn.com> <1992Dec27.031740.27262@mole-end.matawan.nj.us> <1992Dec28.003320.5437@sequent.com> Distribution: usa Lines: 51