Author: Bo Persson
Date: 12:15:11 08/11/04
Go up one level in this thread
On August 11, 2004 at 12:47:43, Anthony Cozzie wrote:
>5 weeks C
> 1 week syntax, types, & printf/scanf
> 1 week loops and conditionals
> 1 week arrays & pointers
> 1 week strings & string libraries
> 1 week structures
>3 weeks C++
> 1 week classes
> 1 week inheritance
> 1 week polymorphism
>
>which I believe would fit a 1 semester class, if I did my math right. Assembly
>is so simple that it practically teaches itself, C is incredibly simple when you
>know assembly, and C++ is C with a few decorations.
Others argue (intensely) that if you want to learn proper C++, you have no use
of learning C first. C++ is not just a few decorations, it is an entirely new
language which requires a different mindset.
*Very* experienced C++ teachers Koening & Moo chose this order for their
"Accellerated C++" book:
Chapter 1 String literals
Chapter 2 Looping and counting
Chapter 3 Working with bathes of data
Chapter 4 Organizing programs and data
Chapter 5 Using sequential containers
Chapter 6 Using library algorithms
Chapter 7 Using associative containers
Chapter 8 Writing generic functions
(templates and iterators)
Chapter 9 Defining new types
(classes, constructors and stuff)
Chapter 10 Managing memory and low-level data structure
Here, finally, the pointer is introduced to explain array,
using the famous words: "A pointer is a kind of random-access
iterator that is essential for accessing elements of arrays, and
has other uses as well."
Here the novice C++ programmer already knows about iterators, containers,
overloaded functions, the standard library, templates, and classes. He knows
nothing about pointers, printf, or scanf, or strcpy! And doesn't need to.
Pointers are introduced just so the authors will be able to explain some strange
things about arrays.
C++ can be seen an entirely new languange, not just some fancy C. :-)
Bo Persson
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.