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. 3.28-3.30 reimplements the program of Figs. 3.18-3.21, using standart class string.























Figure 3.28: 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 3.29: 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 3.30: 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. 3.31-3.34 reimplements the program of Figs. 3.8-3.11, using standart class vector.
Figure 3.31: 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 3.32: 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 3.33: Standart library class vector. (part 3 of 3)
\includegraphics[scale=0.45]{figures/img8.84.ps}
Figure 3.34: Standart library class vector, output.
\includegraphics[scale=0.45]{figures/img8.85.ps}
\includegraphics[scale=0.45]{figures/img8.86.ps}
2004-12-28