Advertisement
Guest User

vstr

a guest
Jun 23rd, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. #include <string>
  4. #include <vector>
  5.  
  6. using namespace std;
  7. int main()
  8. {
  9.     std::vector< string > v;
  10.     int c = 0;
  11.     do
  12.     {
  13.         c++;
  14.         string cadena;
  15.         cout << "Introduce una linea:" << endl;
  16.         cin >> cadena;
  17.         cadena.resize( (size_t) 15);
  18.         v.push_back(cadena);
  19.  
  20.     } while (c < 2);
  21.  
  22.     cout << "El texto total es:" << endl;
  23.     for (vector<string>::iterator it= v.begin(); it < v.end(); ++it )
  24.     {
  25.         cout << *it << endl;
  26.     }
  27.  
  28.     while (true)
  29.     {
  30.  
  31.     }
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement