Actual item in the vector porsche ferrari display the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: porsche ferrari pinto [ ] accesses the...actual item in the vector. Porsche Ferrari // Display the elements: cout << myCars[0].getMake(); cout << myCars[1].getMake(); carArray.cpp 17 24/07/11 carVector.cpp 18 Summary ì OOD array of class Person: Arrays store many items of the same type. : Non-OOD uses... ì : OOD is better : Consider: ì : ì 19 24/07/11 Elements just like other variables (by val or by ref). Actual array is passed as a memory address; so it's always affecting the original array. Vectors like an array, but: : Adding 3 new attributes to the Person class. ì Sorting the array(s) into alphabetical order by name. ì Passing all th...
View Full Document

This note was uploaded on 10/09/2012 for the course CMPT 125 taught by Professor Diana during the Spring '08 term at Simon Fraser.

Ask a homework question - tutors are online