Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2. #include "MyString.h"
  3.  
  4. int main() {
  5.     _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
  6.     String temp("Hello world");
  7.     temp.print();
  8.     temp.append('!');
  9.     temp.print();
  10.     temp.append("!!");
  11.     //temp.print();
  12.     cout << temp << endl;
  13.     bool a = String("aaa") <"bb";
  14.  
  15.     bool b = "aaa" == "aaa";
  16.  
  17.     bool c = "aaa" != String("aa");
  18.  
  19.     bool d = String("aaab") >= String("aaab");
  20.  
  21.     cout << a << endl;
  22.     cout << b << endl;
  23.     cout << c << endl;
  24.     cout << d << endl;
  25.     String s = (temp + temp);
  26.     cout << s;
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement