1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
Initializing and setting elements:
---zero---
---one---
---two---
---three---
---four---
strvector size after first removing one element, and then the rest:
0
Resize to three elements, and set them:
---zero---
---one---
---two---
Then copy the first element over the third element:
---zero---
---one---
---zero---
Make a copy of the strvector and set the last element of the copy:
---zero---
---one---
---copy two---
Append the copy to the strvector:
---zero---
---one---
---zero---
---zero---
---one---
---copy two---
Add two strings at the end:
---zero---
---one---
---zero---
---zero---
---one---
---copy two---
---zeroth---
---first---
strvector size after clearing it:
0
|