Q:

The following code intends to add ten elements to ivec

0

The following code intends to add ten elements to ivec.

All Answers

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

vector<int> ivec; // empty vector
for (decltype(ivec.size()) ix = 0; ix != 10; ++ix)
ivec[ix] = ix; // disaster: ivec has no elements

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