home *** CD-ROM | disk | FTP | other *** search
/ C++ for Dummies (3rd Edition) / C_FD.iso / CHAP05 / CHAP05_3.CPP < prev   
C/C++ Source or Header  |  1996-09-02  |  335b  |  12 lines

  1. // Chap05_3.c
  2. //the second argument defaults to zero if not present
  3. int sampleFunc(int x, int y = 0);
  4. int main() 
  5. {
  6.    sampleFunc(1, 2);     //Line 1 - this is okay;
  7.                          //         donÆt use the default
  8.    sampleFunc(1, 0);     //Line 2
  9.    sampleFunc(1);        //Line 3 - same as line 2
  10.    return 0;
  11. }
  12.