Home

This quiz will ask you to use vector, map, and set to do some interesting things. You’ll want to know how to do the following:

  • Create a vector, map, and set of any type(s)

  • Put stuff in the collection (vector uses push_back, map uses the [] syntax, and set uses insert)

  • Search for elements (or search for keys in a map), using the find function

  • Print all the elements (in the map, print both the keys and values), using an iterator and a for loop

CSCI 221 material by Joshua Eckroth is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Source code for this website available at GitHub.