/vector_codigo5.cpp Secret
Created
July 26, 2021 20:48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// v = {1, 2, 3, 4, 5} | |
v.resize(8); // Muda o tamanho do vector v para 8 | |
// v = {1, 2, 3, 4, 5, 0, 0, 0} | |
// v = {1, 2, 3, 4, 5, 0, 0, 0} | |
v.resize(12,-1); // Muda o tamanho do vector v para 12 e nas posições novas/vazias insere o número -1 | |
// v = {1, 2, 3, 4, 5, 0, 0, 0, -1, -1, -1, -1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment