Draft Notes

 

Please do not expect frequent updates to this file at this time.  When the book reaches a stage where I am tweaking rather than writing from scratch, you will see more here.  As it stands, you can typically see the changes between drafts simply by looking at the new files added and/or all the new pages written.

 

February 27th 2002

 

Looked up proper way of bumping off characters left in the input buffer: ‘sbumpc()’.  The function ‘stossc()’ (which I was using) is apparently optional for implementations.  Isn’t that silly?  Whoever heard of a specification that allows for optional functions?  In any case, this means I changed the strings chapter in regards to input with ‘cin’.

 

February 26th 2002

 

I’m now planning not to write a part on modern C++ and the STL in this book.  Those topics themselves could get huge and this book is concentrating on teaching the language syntax and familiarizing beginners with programming.  Plus, I want to get this book published before next October and the less new work I have to write the more time I have to polish the stuff I’ve already written on.

 

I’m also removing the “C++ Language” (Chapter 5.doc) because I really want to keep useless opinions and history out of the book to make room for pertinent information.  I’ll probably write an article on “Choosing a Language” and post it on NeilStuff.com rather than taking up space in my book.

 

Geez, I just closed this dang document without changing and now I lost a couple paragraphs.  Better for you I guess.  I rewrote the first chapter of Part 1.  It’s now basically complete as a high-level introduction to computers and programming in general.  The later chapters in that part will supplement the first chapter:

 

  1. Introduction to Computers and Programming
  2. Numbering Systems
  3. Digital Storage

 

I moved all of the preface pieces (title, preface, TOC) into one file (Preface.doc).  I also started a file for part 3 (Part 3 – Glossary of Terms and Advanced Concepts.doc).

 

February 21st 2002

 

Another big gap in my updates, I know.  I actually have an excuse, but I won’t explain here.  I got annoyed a couple nights ago by the lack of information on multiple inheritance in books, even ones that are supposed to be “advanced” or “intermediate” level.  I picked up my copy of  C++ How To Program (1994 version) and flipped to the section on multiple inheritance with a specific question in mind.  Do you know what it said when I got to the end of the section and my question was still unanswered?  Something to the effect of “Multiple inheritance is a complex topic dealt with in more detail in more advanced C++ texts.”

 

I was shocked and a bit outraged.  I mean, I purchased the book (used, albeit) with the mindset that it was a fairly advanced reference.  So I picked up C How To Program (I have this too and it has a nice little C++ section in the latter third) and flipped to its section on multiple inheritance.  Would you believe that the wording was almost identical?  Only the examples had changed.

 

Anyway, at the end of the section it said, “Multiple inheritance is a complex topic dealt with in more detail in C++ texts such as C++ How To Program (Prentice Hall, 1994).”  I shit you not!  These guys are teaching programming and they just wrote themselves and infinite loop.

 

I found the answer to my question in Inside COM, though I was just short of actually looking it up in the standard.  I’m determined to put a nice fat chapter on multiple inheritance into this book, dammit!  I just wanted to add that entry … I probably won’t even get around to writing today. L

 

February 1st 2002

 

I fixed two logic errors thanks to the scrutinizing of Tobias-Michael Mantsch.  The first was in the functions chapter where I had a loop that was counting to ten, but I was never incrementing the loop variable.  The second, and more dangerous, was where I was shifting the characters in a string incrementally rather than in reverse.  Thanks Tobias!

January 30th 2002

 

I’m going to rethink the purpose of Part 2.  It is an “introduction to C++”, but leaving it incomplete (not covering everything) seems strange.  So, I’m going to make part 2 the “Syntax” chapter.  It teaches all of the syntax for C++, not methodologies, concepts, or etiquette.  The syntax includes coverage of all keywords and the very basic standard functions used.  A separate book or site would act as a reference (all classes, functions, etc. explained).

 

Part 3 will probably be on standard C++ (the ΓÇ£correctΓÇ¥ way to write a ΓÇ£hello worldΓÇ¥), OOP, and the standard template library.

 

Part 4 will be advanced concepts, tweaking, and tuning.  It will include all the stuff on linked lists, optimization, building large programs from modules, etc.  Part 4 will also lead a small bit into multimedia, GUI, etc.

 

And that I think should wrap up the book quite nicely.

January 23rd 2002

 

Chapter 4 (Flow Control) has been updated with a Namespaces section.  I decided to get that concept in early, so it wasn’t so mind numbing down the road in Classes where it actually becomes an issue.  I’m almost sure I’ve finished Chapter 11 (Classes) because I can’t think of much else to add; anything that would be considered “basic C++ knowledge” that is.  I’m saving operator overloading until later because it’s really just an unimportant feature.  And of course I’ll be updating the chapter later with pictures for each concept and a short example program for each one as well.  Writing first, examples & diagrams later.

January 18th 2002

 

I think perhaps I should insert some coverage of name spaces into the chapter on classes.  I end up delving into them at one point and they’re really not all that complicated.  I think a few sections at the beginning of the chapter should cover them.  Namespaces are really just classes without any instance members and “public” as the default access modifier.

January 14th 2002

 

So I’ve written once again *gasp*!  The chapter on strings is finished and I’m partially through the chapter on pre-processing.  As an added bonus I wrote an introduction to the book last night and put it in the preface.  I like hearing myself talk.  J  I’m planning on adding to this document more often as the draft has grown fairly large.

 

If you pay attention to the Table of Contents you’ll notice that I’m adding a basic chapter on classes in C++.  I decided to do this before the chapter on streaming (which uses classes extensively incidentally) because Part 2 is supposed to give the reader a basic grasp of C++ and classes have to be a part of that.

January 5th 2002

 

The last time I wrote or edited the book was mid-December so I’ve been long overdue for a “comeback”.  A whirlwind of busy-ness has taken me up at work currently so I’m not sure how fast my pace will be.  Within a week or two things should’ve settled more so that I can concentrate on this in my spare time.  One of my New Year’s resolutions is to have this book done before next New Years!  Wish me luck!

 

Although small, my first change was to give the files for chapters under part 2 actual names rather than just numbers; I was starting to have trouble keeping track.  I also removed all multi-dimensional array and pointer pointer material from Chapter 8 because it was too difficult to explain at the experience level I expected there.

October 29th 2001

 

I re-edited all beginning code samples to use ‘int main()’ rather than just ‘main()’.  Thus I also included ‘return 0;’ at the end of all samples.

October 28th 2001

 

The three chapters on pointers, functions, and structures have been recently re-arranged and therefore some of the text may refer to parts wrongly.  I am working to resolve the problems introduced by this recent re-arrangement.  But I believe this new order is an easier learning curve than before.