ENGR 101 Lecture Notes - Lecture 20: Row And Column Vectors
Document Summary
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 of a list of vector identifier; Vectors can also be used to store lists of lists vector< vector > table; Basically makes a matrix or a table. Uses of vectors of vectors: tables of data. An easier way of assigning data to the elements. Easiest way of assigning data to the elements. Similar to vectors, but with less overhead and much less flexibility. Usually used for low-level programming and more easily cause referencing errors. Array size must be set upon creation using an integer constant. Native arrays cannot be returned (easily) from functions or passed to them like vectors. A triangle can be represented by a combination of vertex angles and edge lengths. Heron"s formula lets us calculate the area of a triangle using only it"s edge lengths.