Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 0.25 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. static int Counter;
  6.  
  7. static void addCounter(int);
  8.  
  9. int main()
  10. {
  11.         addCounter(1940);
  12.        
  13.         cout<<"Counter = " <<Counter;
  14.        
  15.         return 0;
  16. }
  17.  
  18. static void addCounter(int incr)
  19. {
  20.         Counter += incr;
  21. }