Created
April 18, 2021 16:03
-
-
Save conqp/a2e6f49728658cc3132930434be07c28 to your computer and use it in GitHub Desktop.
C++ int vector
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
#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