Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Traps, Pitfalls, and Puzzlers

Traps, Pitfalls, and Puzzlers

Before we get to our concluding section demonstrating several Style Case Studies in depth, let's pause to consider a few other C++ issues or just puzzling situations.

Why does C++, like most programming languages, reserve the names of keywords, so that, for example, you can't have a variable named class? Why does a line of code that looks like it ought to be doing some real work actually turn out to do nothing at all, with the compiler emitting not even a single machine instruction for it as though the line didn't even exist? On the other hand, why does code that looks just down-right wrong actually compile and run just fine, legally and reliably? When you're floating in a sea of numbers, why is it good to double-check your work?

Finally, with apologies to Dylan (the troubadour, not the language): How many times must the cannonballs fly before we learn macros don't care? The answer, my friend, is blowin' in the wind, the answer is blowin' in the wind….



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial