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

A

Alf P. Steinbach

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"
<url: http://home.no.net/dubjai/win32cpptut/w32cpptut_01_07.zip>

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:

<url: http://home.no.net/dubjai/win32cpptut/html/>

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top