Listing 2: Reader's implementation of multidimensional arrays

#include <strstream>
#include <iostream>
#include <iomanip>

int main()
{
    const int NUMROWS = 20;
    const int NUMCOLS = 82;
    int i;

    char (*pchararray)[NUMCOLS];
    pchararray = new char[NUMROWS][NUMCOLS];

    for( i = 0; i < NUMROWS; i++ )
        {
        strstream str( pchararray[i], NUMCOLS, ios::in );
        str << "Row number " << setw(2) << i << ends;
        cout << pchararray[i] << endl;
        }

    delete [] pchararray;

    return 0;
}
//End of File