Q:

In the program onpage 354 would it be legal to write the call to insert as follows? If not, why not

0

In the program onpage 354 would it be legal to write the call to insert as follows? If not, why not?

iter = vi.insert(iter, *iter++);

All Answers

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

It is not legal. The order of evaluation of the arguments in function `insert` is undefined, so that if the second argument is evalated first, then the program logic will be wrong.

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