Standard Library Classes string and vector

We learned that we can build a String (Array) class that is better than the C-style, char * strings (pointer-based arrays) that C++ absorbed from C. The programs of Figs. 17-19 reimplements the program of Figs. 7-10, using standart class string.























Figure 17: Standart library class string (part 1 of 2).
\includegraphics[scale=0.45]{figures/img8.73.ps}
\includegraphics[scale=0.45]{figures/img8.74.ps}
Figure 18: Standart library class string (part 2 of 2).
\includegraphics[scale=0.45]{figures/img8.75.ps}
\includegraphics[scale=0.45]{figures/img8.76.ps}
Figure 19: Standart library class string, output.
\includegraphics[scale=0.45]{figures/img8.77.ps}
\includegraphics[scale=0.45]{figures/img8.78.ps}
The programs of Figs. 20-23 reimplements the program of Figs. [*]-[*], using standart class vector.
Figure 20: Standart library class vector. (part 1 of 3)
\includegraphics[scale=0.45]{figures/img8.80.ps}
\includegraphics[scale=0.45]{figures/img8.81.ps}
Figure 21: Standart library class vector. (part 2 of 3)
\includegraphics[scale=0.45]{figures/img8.82.ps}
\includegraphics[scale=0.45]{figures/img8.83.ps}
Figure 22: Standart library class vector. (part 3 of 3)
\includegraphics[scale=0.45]{figures/img8.84.ps}
Figure 23: Standart library class vector, output.
\includegraphics[scale=0.45]{figures/img8.85.ps}
\includegraphics[scale=0.45]{figures/img8.86.ps}
2004-07-15