home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH04 / A040931.WAV (.mp3) < prev    next >
Waveform Audio File Format  |  1993-11-02  |  364.8 KB  |  1 channel  |  11,025 sample rate  |  34 seconds
Transcription: You can define main to take no arguments, or you can define it to take an integer and an array of char stars. In this example, main is defined to take two arguments. The first argument, argc, is equal to the number of elements in the second argument, argv. The second argument is an array that contains the name of the program and the parameters. argc is always at least one because the array argv always contains at least the program name, even if you do not provide any explicit arguments.