Skip to content

Instantly share code, notes, and snippets.

@ampulhetadosaber
Last active August 27, 2020 00:00
Show Gist options
  • Save ampulhetadosaber/680bb572e50783fad966246c5fe55388 to your computer and use it in GitHub Desktop.
Save ampulhetadosaber/680bb572e50783fad966246c5fe55388 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.back() << "\n";
// imprime -15
I.pop_back();
// O ultimo elemento do vector, no caso -15
cout << I.back() << "\n";
// imprime 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment