home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / tcpp / examples / intro24.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-10  |  318 b   |  23 lines

  1. /* INTRO24.C - Beispiel aus Kapitel 4 der
  2.    Einführung */
  3.  
  4. #include <stdio.h>
  5. #include <conio.h>
  6.  
  7. void tally(void);
  8.  
  9. int main()
  10. {
  11.    while (getch() != 'q')
  12.       tally();
  13.  
  14.    return 0;
  15. }
  16.  
  17. void tally(void)
  18. {
  19.    static int called = 0;
  20.    called++;
  21.    printf("%d. Aufruf von tally()\n", called);
  22. }
  23.