ENGR 101 Lecture 19: Vectors

140 views1 pages

Document Summary

Engr 101: introduction to computers and algorithms - lecture 19: vectors. Often times we want to make lists of things that are not characters. Vectors can be used to make lists of anything: int, double, char, string. To declare a vector you have to specify the type you are making a list of. Typically we also want to tell how long this list will be: Can initialize the values in the list to: Individual parts of the list can be accessed using array semantics. Alternatively, the safer at() method to index the list. Other methods also exist to manipulate vectors: V. empty() true if the vector is empty.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents