Home Segments Top Top Previous Next

539: Mainline

You probably do not know exactly how many Movie instances you need to store. Accordingly, you need to define an array that is sure to be large enough to hold all the elements that you can possibly encounter.

If you cannot determine a maximum size for an array because the number of needed elements is too unpredictable, you probably should store your information in a vector. You learn about vectors in Chapter 30.