Listing 7 Illustrates a dynamic array

#include <iostream.h>
#include <dyn_array.h>

main()
{
   const size_t NSTRINGS = 5;
   char *strings[NSTRINGS] =
     {"Go" ,"west", "young", "C++", "hacker"};
   dyn_array<char *> strvec;

   for (int i = 0; i < NSTRINGS; ++i)
      strvec.append(strings[i]);
   for (i = 0; i < strvec.length(); ++i)
      cout << strvec[i] << endl;
   return 0;
}

/* Output:
Go
west
young
C++
hacker
*/
/* End of File */