Skip to content

Instantly share code, notes, and snippets.

@ampulhetadosaber
Last active August 26, 2020 23:51
Show Gist options
  • Save ampulhetadosaber/fd38725d95b2c219a3abfca1bb3c1f21 to your computer and use it in GitHub Desktop.
Save ampulhetadosaber/fd38725d95b2c219a3abfca1bb3c1f21 to your computer and use it in GitHub Desktop.
vector<int> I;
I.push_back(10);
I.push_back(17);
I.push_back(0);
I.push_back(-15);
cout << I[0] << " " << I[2] << "\n";
// imprimimos a primeira e a terceira posição de I
// O vector, assim como a string e o vetor, é indexado em 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment