Error Messages

By now you’ve seen plenty of error messages from your C++ compiler. No doubt, some are helpful and others are cryptic—a few are both. This Exploration presents a number of common errors and gives you a chance to see what kinds of messages your compiler issues for these mistakes. The more familiar you are with these messages, the easier it will be for you to interpret them in the future.

Read through Listing 6-1 and keep an eye out for mistakes.

Listing 6-1.  Deliberate Errors

 1 #include <iosteam> 2 // Look for errors 3 int main() 4 [ 5   std::cout < "This program prints a table of squares.\n"; 6          "Enter ...

Get Exploring C++ 11, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.