home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / EXAMPLES / EX0411.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-27  |  386 b   |  19 lines

  1. // \EXAMPLES\EX0411.CPP
  2.  
  3. #include <iostream.h>
  4.  
  5. void f(int i) {
  6.    i++;                               // increment i
  7.    cout << "Here is i in f(): " << i  // print value of i
  8.         << endl;
  9. }
  10.  
  11.  
  12. void main() {
  13.    int i = 0;
  14.    f(i);                              // pass i by value to f()
  15.    cout << "Here is i after call to f(): " << i  // print i
  16.         << endl;
  17. }
  18.  
  19.