Open for discussion: Correct C++ tutorial part 7 "Create beginner's programs" (Windows, mingw/msvc/s

Discussion in 'C++' started by Alf P. Steinbach, Feb 22, 2005.

  1. The seventh part of my attempted Correct C++ tutorial is now available,
    although for now only in Word format (use free Open Office if no Word), and
    also, it's not yet been reviewed at all -- comments welcome!

    "Create beginner's programs"

    This part focuses on basic techniques and approaches to programming,
    so it could have been titled "Basic methodologies and techniques", but
    what it's all about is the in-practice of creating small C++ programs.

    General URL:


    which provides parts 1 and 2 as web-pages (HTML) in addition to the
    original Word documents of parts 1 through 7 in zipped format.

    Contents, part 7:

    1 Use a top-down approach, a.k.a. stepwise refinement.
    2 Make a routine more reusable by removing side-effects.
    3 Represent a collection of items as a std::vector.
    4 Use a cast + assertion to handle std::size_t for containers.
    5 Use an initial vector size and a default value for items.
    6 Implement a table, technique #1: manual indexing.
    7 Implement a table, technique #2: vector of vectors.
    8 Implement a table, technique #3: item accessor function.
    9 Use a modular approach (long).
    10 Use an iterative approach, “try and fail”.
    11 Optimize the right thing –- if needed (long).

    As before, the point of inviting comments is to _fix_ anything incorrect, or
    the presentation, or whatever; your input is valuable, and you can thereby
    help those who stumble across this tutorial and use it to learn C++.

    Thanks in advance,

    - Alf

    PS: Sorry, there's still no C++ curve example! But at least now the tools and
    techniques to create one are in place.

    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?

    [ See for info about ]
    [ comp.lang.c++.moderated. First time posters: Do this! ]
    Alf P. Steinbach, Feb 22, 2005
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alf P. Steinbach
    Alf P. Steinbach
    Feb 1, 2005
  2. Alf P. Steinbach
    Jan 24, 2005
  3. Alf P. Steinbach
    Alf P. Steinbach
    Feb 23, 2005
  4. Alf P. Steinbach
    Alf P. Steinbach
    Feb 22, 2005
  5. Alf P. Steinbach
    Thomas Hansen
    Apr 11, 2005

Share This Page