Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

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

 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      02-17-2005
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?
 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      02-18-2005
* 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?
 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      02-22-2005
* 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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Pointers and polymorphism explained [preview, PDF, part of my attempted "Correct C++ Tutorial"] Robert Macy C++ 11 11-05-2005 05:04 PM
Correct C++ tutorial part 5 "How to use libraries" available (Windows, mingw/msvc/std) Alf P. Steinbach C++ 10 02-23-2005 09:59 PM
Open for discussion: Correct C++ tutorial part 7 "Create beginner's programs" (Windows, mingw/msvc/std) Alf P. Steinbach C++ 0 02-22-2005 09:14 PM
Correct C++ tutorial part 3 "Intro to loops" available (Windows, mingw/msvc/std) Alf P. Steinbach C++ 13 02-01-2005 09:58 AM
Correct C++ tutorial part 4 "Decisions & conditions" available (Windows, mingw/msvc/std) Alf P. Steinbach C++ 7 01-24-2005 01:44 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57