// shows using a static variable to implement a counter
//
// change the declaration of the variable count in this function
// so that it is not static, and see what happens.

#include <iostream.h>
int countcalls(void) {
  static int count = 0;
  count++;
  return(count);
}


int main(void) {

  cout << countcalls() << endl;
  cout << countcalls() << endl;
  cout << countcalls() << endl;

  return(0);
}

