writer a program that allows the user to enter an


Writer a program that allows the user to enter an unknown number of characters, stores those characters in a data structure (a vector) and then prints the values to the screen.

an example :

witness my exciting first use of vectors!

Enter as many letter as you like, enter ! to quit.

enter a letter: b

enter a letter: u

enter a letter: r

enter a letter: r

enter a letter: p

enter a letter: !

Great! you entered: burrp

The frist character is : b

The last character is : p

 

 

 

Note: the exclamation point was never stored in the vector.

Goal: recognize that vector objects allow greater flexibility that arrays and how to use a vector in a program.

you do not need to specify size when using vectors.

 

 

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: writer a program that allows the user to enter an
Reference No:- TGS0497848

Now Priced at $25 (50% Discount)

Recommended (96%)

Rated (4.8/5)