lect14 Vectors II

lect14 Vectors II - Upcoming Events Project Check Due Next...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Upcoming Events Project Check Due Next Week in Lab Phase I main(), menu() Functions and Reading in File Stub Functions Last Lectures Next Week Project and Evaluations Final Exam Reviews Final Exam Times: Mon 10:00 Class: TBD Mon 11:25 Class: TBD Wed 6:25 Class: TBD Changes: Send email to [email protected]
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Survey Time Survey available at: survey.iit.edu
Background image of page 2
Vectors A Vector Is a Resizable Array Must Include File <vector> Declaration of Vector Syntax: vector< type > variableName; vector< type > variableName( size ); vector< type > variableName( size , initialValue );
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
#include <iostream> #include <vector> using namespace std; int main() { vector<double> vals1; vector<double> vals2(5); vector<double> vals3(5,100); return(0); }
Background image of page 4
Using Vectors May Access Data the Same as Arrays Use Square Brackets ( [ ] )
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
#include <iostream> #include <vector> using namespace std; int main() { vector<double> vals1; vector<double> vals2(5); vector<double> vals3(5,100); vals2[0] = 6; cout << vals3[2]; return(0); }
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 13

lect14 Vectors II - Upcoming Events Project Check Due Next...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online