home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH05 / A052204.TXT < prev    next >
Encoding:
Text File  |  1993-11-30  |  486 b   |  9 lines

  1. This line compares two strings:  a name already stored in the
  2. PhoneBk object and the name specified by the argument "who".  As
  3. the function strcmp() requires two arguments of type char*, each
  4. entry in "names" must be cast from the address of a String to a
  5. char*.  This syntax is not unusual in C++.  If the names are the
  6. same, the string compare function returns 0, or false.  The loop
  7. continues until every entry in "names" has been checked, or until
  8. a matching name is found.
  9.