home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH04 / A040931.TXT < prev    next >
Encoding:
Text File  |  1993-10-29  |  502 b   |  9 lines

  1. You can define main() to take no arguments, or you can define it
  2. to take an integer and an array of char*. In this example, main()
  3. is defined to take two arguments.  The first argument, argc, is
  4. equal to the number of elements in the second argument, argv.  The
  5. second argument is an array that contains the name of the program
  6. and the parameters.  argc is always at least one because the array
  7. argv always contains at least the program name, even if you do not
  8. provide any explicit arguments.
  9.