HICONT

ClassStrings

Mar 31st, 2022 (edited)
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include<locale>
  2. #include<iostream>
  3. #include"Strings.h"
  4. int main()
  5. {
  6.     MyString A("ABC");
  7.     MyString B;
  8.     MyString C(A);
  9.  
  10.     for (int i = 0; i < A.GetCount(); i++) {
  11.         cout << A[i];
  12.     }
  13.     cout << endl;
  14.  
  15.     for (int i = 0; i < B.GetCount(); i++) {
  16.         cout << B[i];
  17.     }
  18.     cout << endl;
  19.  
  20.     B = A;
  21.  
  22.     for (int i = 0; i < B.GetCount(); i++) {
  23.         cout << B[i];
  24.     }
  25.     cout << endl;
  26.  
  27.     for (int i = 0; i < C.GetCount(); i++) {
  28.         cout << C[i];
  29.     }
  30.     cout << endl;
  31.  
  32.     return 0;
  33. }
Add Comment
Please, Sign In to add comment