Flow-control structures: Difference between revisions
Content added Content deleted
(→Case 8 - continue: else in "for" loop) |
m (→Exceptions: Added note on usage) |
||
Line 56: | Line 56: | ||
'''Compiler:''' [[GCC]] 4.0.2 |
'''Compiler:''' [[GCC]] 4.0.2 |
||
Exceptions are a way to give control back to a direct or indirect caller in case of an error. |
Exceptions are a way to give control back to a direct or indirect caller in case of an error. Note that throwing exceptions is usually very expensive, therefore they generally should only be used for exceptional situations. |
||
#include <iostream> |
#include <iostream> |
||
#include <ostream> |
#include <ostream> |