Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
Add a README.md file in ch18.
  • Loading branch information
hucaser authored and pezy committed Mar 18, 2015
1 parent 06b16b5 commit b12fe9c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ch18/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##Exercise 18.4

> What is the type of the exception object in the following throws?
>
> **(a)**`range_error r("error");`
> `throw r`;
> **(b)**`exception *p = &r;`
> `throw *P;`
>What would happen if the `throw` in **(b)** were written as `throw p`?
The type of the exception object in (a) is range_error which is used to report range errors in internal computations.
The type of the exception object in (b) is exception.
If the "throw" in (b) were written as "throw p", there will be a runtime error.

0 comments on commit b12fe9c

Please sign in to comment.