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.
--
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 http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]