By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,389 Members | 1,881 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,389 IT Pros & Developers. It's quick & easy.

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

P: n/a
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! ]

Jul 23 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.