CMPT 212
Fall 1997
|
It is sometimes easier to work out solutions to these problems by drawing diagrams like those above and working it out on paper.
void f(int x) { static int count = 0; count++; cout << "f has been called " << count << " times."; ... return; }count exists for the duration of the program, although its scope is just the function f.
Return to lecture notes index |
|
This page is maintained by simpson@cs.sfu.ca. | Last updated on 25 Sep 1997. |