![]() |
CMPT 212
Spring 1998
|
![]() |
|
float square_root(float) throw (char *); void other_func() throw (int, char *); void f() throw (); // throws no execptions.
class myException { public: myException(int i) { ... } void display() { ... } ... }: void f() { try { ... throw myException(3); ... } catch (myException& e) { e.display(); } ... }
catch (derivedException& e) { ... }
void swap(int & x, int & y) { int temp = x; x = y; y = temp; }
template <class T> void swap(T & x, T & y) { T temp = x; x = y; y = temp; }
![]() Return to lecture notes index |
|
This page is maintained by simpson@cs.sfu.ca. | Last updated on 30 Mar 1998. |