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

Correct C++ tutorial part 6 "Functions, a.k.a. routines" available (Windows, mingw/msvc/std)

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

"Functions, a.k.a. routines"
<url: http://home.no.net/dubjai/win32cpptut/w32cpptut_01_05.zip>

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 6 in zipped format.

Since Word managed to add almost 800 KiB of empty space to the last file
I thought zipping it might be a Good Idea, bringing it down to 90 KiB.

Sorry, there's no C++ curve! Next part, probably. For now there are some
other interesting pictures and techniques, and I think perhaps this part
again may encourage lively discussion for both newbie and experienced (as
even the "Hello, world!" of part 1 did, not to mention "Variables" part 2!).

Contents, part 6:

1 Refactor by defining a simple & useful command routine.
2 [Pitfall:] Forgetting argument list in a routine call.
3 Define routines with call results (function routines).
4 Define routines with value arguments & overload ’em.
5 Simplify by defining data conversion function routines.
6 [Background:] Reuse via logical modules.
7 Create and understand a module header file.
8 Use a module header file with namespace in a program.
9 Create and understand a module implementation file.
10 [Tool usage:] Build modules and a program that uses them.
11 Implement an algorithm as a routine.
12 Use assertions.
13 Explore and play: generate some interesting pictures.
14 Wrap an awkward interface in an easier-to-use interface.
15 Use pass-by-reference arguments.
16 Secure and optimize by passing by reference to const.
17 [Pitfall:] Return by reference can be very dangerous.

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

--
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?
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* Alf P. Steinbach:

"Functions, a.k.a. routines"
<url: http://home.no.net/dubjai/win32cpptut/w32cpptut_01_05.zip>
Should of course be

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

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 6 in zipped format.


--
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?
Jul 23 '05 #2

P: n/a
* Alf P. Steinbach:
* Alf P. Steinbach:

"Functions, a.k.a. routines"
<url: http://home.no.net/dubjai/win32cpptut/w32cpptut_01_05.zip>


Should of course be

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


I found an error in the _introduction_, where my pesky keyboard had inserted
words to the effect that std::getline has no call result.

Corrected.

--
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?
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.