home *** CD-ROM | disk | FTP | other *** search
- // Chap05_3.c
- //the second argument defaults to zero if not present
- int sampleFunc(int x, int y = 0);
- int main()
- {
- sampleFunc(1, 2); //Line 1 - this is okay;
- // donÆt use the default
- sampleFunc(1, 0); //Line 2
- sampleFunc(1); //Line 3 - same as line 2
- return 0;
- }
-