/************************** BOXERS2.CPP ***************************************
* Example showing an array of string pointers.                     1998-10-01 *
*                                                                   Agner Fog *
*                                                                             *
* boxers is an array of char pointers, each pointing to a string containing   *
* the name of a boxer.                                                        *
*                                                                             *
* This method takes less space than a two-dimensional array if the strings    *
* have different lengths. See the file BOXERS1 for comparison.                *
*                                                                             *
******************************************************************************/
#include <iostream.h>
#include <conio.h>

void main () {
   char * boxers[5] =
   {  "Brian Nielsen",
      "Muhammed Ali",
      "Hasan Al",
      "Racheed Laval",
      "Tom Bogs"
   };
   int n;
   cout << "\nEnter number ";
   cin >> n;
   if (n >= 0 && n < 5)
   {
      cout << boxers[n];
   }

   // wait for key pressure
   getch();
}
