C++ Lab 18 - Vectors Shopping List

Feb 3rd, 2012
Studypool Tutor
Price: $10 USD

Tutor description

Lab 18 - Vectors Top of Form Bottom of Form Content l18 Create a program that reads in an arbitrary number of items and stores them in a vector.  Then output the contents of the vector. Example (keyboard input shown in bold): Enter in your shopping list.  Enter in * to indicate you are done chocolate milk eggs cheese * Here is your list: chocolate milk eggs cheese

Word Count: 61
Showing Page: 1/1
#include #include #include using namespace std;int main(){ vector items; cout << "Enter in your shopping list. Enter in * to indicate you are done" << endl; string item; getline(cin, item); while(item!="*"){ items.push_back(item

Review from student

Studypool Student
" Excellent work as usual "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1827 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors