Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "MyString.h"
- int main() {
- _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
- String temp("Hello world");
- temp.print();
- temp.append('!');
- temp.print();
- temp.append("!!");
- //temp.print();
- cout << temp << endl;
- bool a = String("aaa") <"bb";
- bool b = "aaa" == "aaa";
- bool c = "aaa" != String("aa");
- bool d = String("aaab") >= String("aaab");
- cout << a << endl;
- cout << b << endl;
- cout << c << endl;
- cout << d << endl;
- String s = (temp + temp);
- cout << s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement