Created
May 21, 2019 22:11
-
-
Save Thiago4532/da6e387ff4d60d587156dfb9fbb6fe35 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#include <vector> // Biblioteca que contem a estrutura vector | |
using namespace std; | |
int main() { | |
vector<int> v; // Declaracao de um vector do tipo int | |
// No inicio o vetor esta vazio | |
v.push_back(1); // Insiro o elemento 1 no final do vetor | |
v.push_back(3); // Insiro o elemento 3 no final do vetor | |
v.push_back(5); // Insiro o elemento 5 no final do vetor | |
v.push_back(7); // Insiro o elemento 7 no final do vetor | |
// O vetor final é {1, 3, 5, 7} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment