Skip to content

Instantly share code, notes, and snippets.

@ElemarJR
Created December 1, 2012 17:19
Show Gist options
  • Select an option

  • Save ElemarJR/4183315 to your computer and use it in GitHub Desktop.

Select an option

Save ElemarJR/4183315 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> values;
int value;
cout << "enter a integer value list (^Z to complete): ";
while (cin >> value) {
values.push_back(value);
}
for (int i = 0; i < values.size(); i++) {
cout << values[i] << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment