...a) not be able to match the debug error to any obvious problem in my program AND b) be able to see NO difference between my program and the example text in the book.
Yeah... This kind of thing happens to programmers every day! And, not just when copying an example program... Sometimes you just can't "see" what's wrong. And, it can be very frustrating... You never know if it's going to take you five minutes or five hours to find a bug. You will get better at avoiding errors, spotting errors, and interpreting compiler messages. But, your programs will also get bigger and more complicated.

The error message is usually helpful, but compilers are easily confused.... The compiler doesn't know what you are trying to do, and sometimes the error messages can be misleading. I once misplaced one "tiny" bracket (in a big program), and the compiler reported hundreds of errors... And, none of those errors said anything about a misplaced bracket!

BTW - You are doing the right thing by typing-in the programs by hand. It's easy to gloss-over details if you simply download the examples.

When you can't figure-out the problem from the compiler error, or visually find the problem, the best solution is usually to start "commenting-out" lines (or sections of code) 'till the compile problem goes away. That way, you can zero-in on the exact line of code that's causing the error.

Of course, you have to know something about C++, so that you can comment-out lines without causing additional errors... You have to know which lines to comment-out first. For example, you can usually comment-out all of the lines inside a function, and you can make the function return a "dummy" value, if it's supposed to return something.

And yes, a proper programming editor will make things easier. It will color-highlight keywords, and other "parts" of your program, and it will make indenting easier, etc. (I've got my editor set-up to color-code simicolons, brackets, and parenthesis.)

When you are writing/developing your own programs, you should take a similar approach. But, you don't have to "comment-out" lines, you just have to add code a few lines at a time. Test compiling, and test-running every few lines of code. This will make programming a lot less frustrating... It's much easier to debug, if you know the error is in the last one or two lines you just added.

Again, the trick is to know what's required to make the program compile and run, and how to sequence your program. (i.e. Your program won't compile or run if you just write the first five lines of code... You have to know figure-out which lines to write first, and what blanks to fill-in next, etc.)

Professional programmers do the same thing. Of course, they won't test-compile and test-run every few lines. But they will test-out their code frequently as they develop the program.

And, it's often useful to add some "extra" cout statements during development. It can help you to "see" what your program is doing, before it's done. You can display variables or you can, add little messages that say something like "Starting strInvertCase() function". The extra cout statements wont' help with compiler errors, but they can help you with run-time errors, and they can help to confirm that your program is "working" before it's completely done.