Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <algorithm>
- #include <string>
- #include <vector>
- #include <iostream>
- using namespace std;
- class ReversibleString {
- public:
- ReversibleString (){}
- ReversibleString (const string& str){
- s = str;
- }
- string ToString () const {
- return s;
- }
- void Reverse (){
- reverse (s.begin(), s.end());
- }
- private:
- string s;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement