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

Discussion in 'C++' started by Alf P. Steinbach, Feb 17, 2005.

  1. 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?
    Alf P. Steinbach, Feb 17, 2005
    #1
    1. Advertising

  2. * 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?
    Alf P. Steinbach, Feb 18, 2005
    #2
    1. Advertising

  3. * 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?
    Alf P. Steinbach, Feb 22, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alf P. Steinbach
    Replies:
    13
    Views:
    665
    Alf P. Steinbach
    Feb 1, 2005
  2. Alf P. Steinbach
    Replies:
    7
    Views:
    3,060
    chris
    Jan 24, 2005
  3. Alf P. Steinbach
    Replies:
    10
    Views:
    772
    Alf P. Steinbach
    Feb 23, 2005
  4. Alf P. Steinbach
    Replies:
    0
    Views:
    581
    Alf P. Steinbach
    Feb 22, 2005
  5. Alf P. Steinbach
    Replies:
    25
    Views:
    962
    Thomas Hansen
    Apr 11, 2005
Loading...

Share This Page