Advertisement
makispaiktis

Message

Sep 2nd, 2018 (edited)
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <map>
  4. #include <algorithm>
  5. #include <string>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.    
  12.  
  13.     cout << endl << "Give me a string for convert." << endl;
  14.     string message;
  15.     cin >> message;
  16.  
  17.     vector <char> v;
  18.  
  19.     for(int i=0; i++;){
  20.  
  21.         if(message[i] == '/0'){
  22.  
  23.             break;
  24.         }
  25.  
  26.         else{
  27.  
  28.             v.push_back(message[i]);
  29.         }
  30.     }
  31.  
  32.     for(unsigned int i=0; i<v.size(); i++){
  33.  
  34.         cout << v[i] << endl;
  35.     }
  36.  
  37.     return 0;
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement