Which of the following could you use to declare the iterator p? Why?
Suppose you want to run code that involves the loop
```
//Assume vector v and iterator p has been defined and
//given appropriate values
for (p = v.begin(); p != v.end(); p++)
cout << *p << “ “;
```
```
std::vector
std::vector
```
You could use either, but you probably should use const_iterator. In the loop, the iterator p is used to fetch from the container. There is no code that would change the container’s contents.
You might also like to view...
Under which law must healthcare enterprises guard protected health information and implement policies and procedures to safeguard it, whether it be in paper or electronic format?
A. Sarbox B. COPPA C. GLBA D. HIPAA
On the Layers panel, artwork on a top layer appears ____artwork on layers beneath it.
A. above B. behind C. in front of D. under
When using WordArt, special effects are applied to the text itself, not to the shape surrounding the text
Indicate whether the statement is true or false
The ComboBox control combines a TextBox with a control.
a) DateTimePicker b) ListBox c) NumericUpDown d) Label