Skip to content

Instantly share code, notes, and snippets.

@conqp
Created April 18, 2021 16:03
Show Gist options
  • Save conqp/a2e6f49728658cc3132930434be07c28 to your computer and use it in GitHub Desktop.
Save conqp/a2e6f49728658cc3132930434be07c28 to your computer and use it in GitHub Desktop.
C++ int vector
#include <iostream>
#include <vector>
using std::cout;
using std::endl;
using std::vector;
int main()
{
vector<int> v = {1,2,3,5,9,7};
v.push_back(8);
for (int item : v)
cout << item << " ";
cout << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment