Advertisement
Felanpro

vector + for-loop

Jun 29th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdlib.h>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.  
  10.     vector <string> halsningar;
  11.     halsningar.push_back("Hello");
  12.  
  13.     for(int x = 0;x < 10 + 1;x++)
  14.     {
  15.         cout << halsningar.at(0) << endl;
  16.     }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement