The entries of vectors are mutable and can be changed freely, using indices and the bracket notation, just like we do with static arrays:
vector<string> names = {"Andy", "Mary", "Cody"};
names[0] = "Mircea";
names[2] = "Mike";
// names is now {"Mircea", "Mary", "Cody"}
Assignment
Follow the Coding Tutorial and let's play with some arrays.
Hint
Look at the examples above if you get stuck.
Free plan: 30 tutor messages. PRO is unlimited.
Saved
Ctrl + Enter to check
