Q:

We can also initialize a vector from a count and an element value. The count determines how many elements the vector will have; the value provides the initial value for each of those elements

0

We can also initialize a vector from a count and an element value. The count determines how many elements the vector will have; the value provides the initial value for each of those elements.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

vector<int> ivec(10, -1); // ten int elements, each initialized to - 1
vector<string> svec(10, "hi!"); // ten strings; each element is "hi!"

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now