home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH17 / A17173.TXT < prev    next >
Encoding:
Text File  |  1993-09-16  |  547 b   |  10 lines

  1. This is the function declaration for the class constructor.
  2. Notice that the function takes a single argument, "capacity".
  3. "capacity" is the maximum number of elements that can be stored in
  4. the array.  The default "capacity" is 10.
  5. An initializer list is used to set the initial state of the
  6. object.  "size" is initialized to zero, "free" to 0, and "pArray"
  7. to NULL.  The constructor attempts to allocate an array of type
  8. "T".  An exception is thrown if the memory allocation fails.
  9. Otherwise, "capacity" is assigned to "size" and "free".
  10.