TermSpar

Youtube Vec

Apr 20th, 2016
1,868
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3. #include<vector>
  4. #include<windows.h>
  5.  
  6. using namespace std;
  7.  
  8. int main(){
  9.    
  10.     vector<string> uVec;
  11.  
  12.     string uInput;
  13.     cin >> uInput;
  14.  
  15.     while(uInput != "x"){
  16.         uVec.push_back(uInput);
  17.         cin >> uInput;
  18.     }
  19.  
  20.     for(unsigned int i = 0; i < uVec.size(); i++){
  21.         cout << "VECTOR:";
  22.  
  23.         cout << uVec[i];
  24.  
  25.         cout << endl;
  26.     }
  27.  
  28.     system("pause");
  29.     return 0;
  30. }
Add Comment
Please, Sign In to add comment