// Dave Goldsmith // Redwood High School // C++ Computer Programming // November 18, 1999 // APmatrix4.cpp /* This program demonstrates how a specific character in an element of an apmatrix of apstrings can be accessed. This is similar to the way individual characters are accessed from apstrings. */ #include // Required for 'cin' and 'cout' #include // Required for 'apstring' #include // Required for 'apstring' #include // Required for 'apmatrix' int main() { apmatrix word(4,3, ""); // Matrix of 12 apstrings, all empty word[2][1] = "aardvark"; // Set element in row 2, column 1 cout << word[2][1] << endl; // Show element in row 2, column 1 cout << word[2][1][6] << endl; // Show 7th character of above element return 0; }