Vectors and Arrays (including text strings)

CS-150, Fall '02, Learning Objectives


Arrays and Vectors

Be able to explain a practical difference between C style arrays and STL vectors.

Be able to explain the difference between scalar and array or vector variables.

Know what file must be included to use standard STL vectors.

Be able to recognize when C style arrays or STL vector objects (vectors) would be useful.

Be able to create C style arrays or STL vectors.

Be able to access a particular element of a C style array or STL vector using an index (subscript).

Optional: Be able to describe and use the following vector member functions: .size(), .push_back(item) and .pop_back().

Be able to pass C style arrays or STL vectors as arguments to functions and return vectors from functions.

Be able to explain why it is often best to pass C style arrays and STL vectors by constant reference.

Be able to explain what parallel vectors are and use them in programs.

Be able to describe two-dimensional C style arrays.

Be able to define two-dimensional C style arrays.

Be able to write C++ code that performs simple processing of one and two dimension arrays.

Strings

Be able to explain what the general term string refers to in the context of computer programming.

Know that C style strings are null terminated arrays of characters.

Be able to explain the role of the null character found at the end of C style strings.

Be able to explain key differences among C/C++ characters, C style strings (arrays of characters) and STL strings.

Be able to read (extract) text from cin or a file stream.

Be able to write (insert) text to cout or a file stream.

Be able to write C++ code to perform simple text processing tasks using C style or STL strings (but not both). 


Send comments and suggestions about these objectives to: Dr. Charles S. Tritt
This page last updated 11/19/02