Advertisement
spirtus

Untitled

Sep 25th, 2017
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <algorithm>
  2. #include <string>
  3. #include <vector>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. class ReversibleString {
  8. public:
  9.     ReversibleString (){}
  10.     ReversibleString (const string& str){
  11.     s = str;
  12.  
  13.     }
  14.     string ToString () const {
  15.         return s;
  16.     }
  17.     void Reverse (){
  18.         reverse (s.begin(), s.end());
  19.     }
  20. private:
  21.     string s;
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement