// Justin C. Miller
// University of Wisconsin Oshkosh
// Made for: http://www.geocities.com/neonprimetime.geo/index.html
// Date: 2001
// Borland Builder 4.0
#include
#include
int main()
{
const int words = 5 ; // number of words in my array
const int size = 20 ; // max size of a word
char * myarray[words] ;
// you must initialize all pointers
// since i'm creating 5 character strings
// i need to initialize 5 pointers
// just like the following for loop
for(int k = 0 ; k < 5 ; k++)
myarray[k] = new char[size] ;
cout << "Please enter " << size << " integers..." << endl ;
// read in 5 strings from the user
for(int i = 0 ; i < 5 ; i++){
cout << "Please enter word " << (i+1) << endl ;
cin >> myarray[i] ;
}
// print out the 5 strings in the array
cout << "\n Your 5 words are below..." << endl ;
for(int j = 0 ; j < 5 ; j++)
cout << myarray[j] << endl ;
getch() ;
return 0 ;
}
               (
geocities.com/neonprimetime.geo/cpp)                   (
geocities.com/neonprimetime.geo)