how can I create a vector with the following devices: printer, disk, cd/rw.
so the user is going to ask first for the number of printers, disk, cd/rw, so if user enters 3 for printers, 4 for disks and 2 for cd/rws it should print the following:
so it needs to print p1 p2 p3 d1 d2 d3 d4 c1 c2
I need to do this using vector, someone please help!
If I understand your quiz correctly, you may first declare a vector<string>, and insert values depending on the user input. And finally you just print all the contents in the vector to screen.
so this is what I did, but all it does it output 2 2 2 if that's what I enter. but if I enter 2 for AllDevices [0] it needs to print 1 2. So therefore it should be printing 1 2 1 2 1 2