August 2001
Beginner
482 pages
10h 52m
English
Compile-time errors can occur for any number of reasons. Usually they are a result of a typo or other inadvertent minor error. Some compilers will not only tell you what you did wrong, they'll point you to the exact place in your code where you made the mistake. And some will even suggest a remedy!
You can see how your compiler will react by intentionally putting an error into your program. If HELLO.CPP ran smoothly, edit it now and remove the closing brace on line 6. Your program will now look like Listing 1.2.
0: #include <iostream>
1:
2: int main()
3: {
4: std::cout << "Hello World!\n";
5: return 0;
|
Recompile your program and you will see an error that looks similar to
Line Unit ...
Read now
Unlock full access